S sandrao Registered User. Local time Today, 15:52 Joined Sep 6, 2007 Messages 34 May 2, 2008 #1 How can I have a number field behave like the auto number function? I saw somewhere that through code you could have the number field increase each record by 1. Any ideas?
How can I have a number field behave like the auto number function? I saw somewhere that through code you could have the number field increase each record by 1. Any ideas?
pbaldy Wino Moderator Staff member Local time Today, 12:52 Joined Aug 30, 2003 Messages 36,272 May 2, 2008 #2 It is often done using a DMax: NewNumber = Nz(DMax("NumberField", "TableName"), 0) + 1
S sandrao Registered User. Local time Today, 15:52 Joined Sep 6, 2007 Messages 34 May 2, 2008 #3 Where would I place the Code? In the actural number field? In the Form?
pbaldy Wino Moderator Staff member Local time Today, 12:52 Joined Aug 30, 2003 Messages 36,272 May 2, 2008 #4 Sort of depends on the specifics of your application. If you search on DMax here you'll probably find several discussions on this topic. It comes up pretty often.
Sort of depends on the specifics of your application. If you search on DMax here you'll probably find several discussions on this topic. It comes up pretty often.