Autonumber recordset by recordset

  • Thread starter Lasitha via AccessMonster.com
  • Start date
L

Lasitha via AccessMonster.com

I created table & Query in wihich there are Date, Good Issue Number(GIN),
Itemcode, Quantity & Price.
Then I created a form for that Query. I took Date & GIN to header of the form.
Itemcode Quantity & Price in Details of the form.

Here, Itemcode Quantity & Price belongs to GIN. GIN is an Auto Number. But I
want keep that GIN Number to set of variable record sets I mean there may be
5 or 8 records. Then next record set should be taken the next GIN auto number.

Therefor have create a cmd button and made a macro to "Close that form and
Openform again to enter new details record.

But that GIN is changed individual Detail by individual detail. How I want to
code to keep the same GIN for that variable details record set and next GIN
auto number for new detail record set.

Any help is Appreciateble.
 
B

BruceM

Use two tables. The main table has GIN and RecordDate. A related table has
the rest of the information:

tblMain
GIN (autonumber primary key, or PK)
RecordDate

tblDetail
DetailID (autonumber PK)
GIN (foreign key,or FK -- Number data type (Long Integer))
ItemCode
Qty
Price

Create a relationship between the GIN field in the two tables. Make a main
form based on tblMain, with a subform based on tblDetail. Set the Default
View of the subform to Continuous if you want to see all of the detail
records at once.

More about how the pieces fit together:
http://allenbrowne.com/casu-22.html

That link has lots of good information, plus which it has links to other
sites with yet more information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top