autonumber

S

SHETTY

Dear Friends

I have got 2 sub table with autonumbers -both are primey keys
There may be problem while consolidating data of 2 tables in querry

So I want to start autonumner of 2nd table from 5000
is it is possible

please help me

ramesh shetty
 
S

scubadiver

I think an easier thing to do would be to treat the field as integer, enter
5000 into the first record and then increment by one for each record.
 
S

scubadiver

Found this in another thread:

One easy way is to use the Form's BeforeInsert event:

Private Sub Form_BeforeInsert(Cancel as Integer)
Me!ID = DMax("[ID]", "[YourTableName]") + 1
Me.Dirty = False ' force a save of the record to disk
End Sub
 
M

Michael Gramelspacher

Found this in another thread:

One easy way is to use the Form's BeforeInsert event:

Private Sub Form_BeforeInsert(Cancel as Integer)
Me!ID = DMax("[ID]", "[YourTableName]") + 1
Me.Dirty = False ' force a save of the record to disk
End Sub


SHETTY said:
Dear Friends

I have got 2 sub table with autonumbers -both are primey keys
There may be problem while consolidating data of 2 tables in querry

So I want to start autonumner of 2nd table from 5000
is it is possible

please help me

ramesh shetty
Seems to me that trying to force a save may not work if any fields are
designated not null.
 

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

Similar Threads


Top