New Record in VB

  • Thread starter KimTong via AccessMonster.com
  • Start date
K

KimTong via AccessMonster.com

Hi all,

I created a continous Form in Access to enter our AWB# and Adhoc#. I'd like
to add AdHoc# automatically (like autonumber) when we move the cursor to new
record (without pressing any botton).

How does Vb recognise this is a new record or not? Is anyone can give me an
idea?. I already know how to make autonumber by ourselve (without using
autonumber in Access table) by pressing 'Add new record' then using VB scrip
Dmax("[fieldname]","[tablename]")+1.

Thank you in advance.

KFT
 
G

George Nicholson

Me.NewRecord is the customary "new record" check and is most commonly used
in the Form_Current event. The Current event fires whenever you move to a
record (including form open, next record, previous record, new record, etc.)

If Me.NewRecord Then
' Add AWB#
' Add Adhoc#
End If


HTH,
 

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