using vba to update record in another table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am new to VBA, but here is what i want to accomplish.
I have 1 form and 2 tables.

Form uses table 1 to store data (first,last,address,tel.site (a), sit (b)
eash site has a unique number..)

Table 2 stores site information and unique number( range number for site (a)
is 1 to 1000 range for site (b) 1000 to 4000).
How do i increment the number by one every time a new record is added to a
site. For example first record is site (a) is 1000, next time i add a record
for site(a) number must be 10002 and same for site (b).

Please help thanks
 
Hey learner,

You would need to decide where you wanted to place this to get it to
increment by one by this should work for you.

Nz(DMax("[NameOfField]", "NameOfTable", ""), 0) + 1

HTH,
Shane
 

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

Back
Top