Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic generate a new ID on subform start 1 based on parent ID

Status
Not open for further replies.
Feb 4, 2009
137
US
I have a question, please help. I'm very appreciated. Thanks.
I have access 2007 font end and sql 2005 back end.

tblA ...ID1 (pk) (number - long integer)
tblB- ID1 (pk) (number - long integer)
ID2 (pk) (number - long integer)

tblA uses on data source on parent form, and tblB for subform. When adding a new record on subform I would like it automatically get new record = 1 on each ID on parent form.

For instant:

tbl A; ID1 = 1
tbl B: ID1= 1
ID2= 2 (next record, and so on)

then
tbl A; ID1 = 2
tbl B: ID1= 1
ID2= 2 (next record, and so on)

then

tbl A; ID1 = 3
tbl B: ID1= 1
ID2= 2 (next record, and so on)


Is it possible?
Again thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top