Simple Ref number for a form

P

Paul

Sorry but I have got stuck on the simple things. Don't want to use
auto number. I have a REF Field starting at 101. I want to increment
this by 1 every time I enter a new record, thanks
 
R

Ron

Sorry but I have got stuck on the simple things. Don't want to use
auto number. I have a REF Field starting at 101. I want to increment
this by 1 every time I enter a new record, thanks

Hi

I'm not an expert here, but noticed nobody had answered you yet so
I'll give it a try (if nothing else, it'll get the *real*
knowledgeable people here to post that I don't know what I'm talking
about!).

In the default for the control you want to increment for each record,
put = DMax("ControlName", "TableName") + 1
(substitute your particulars...but use the quotes)

If you're doing a multiuser kinda deal, you'll be better off assigning
this default in a bit of code, and error trapping it. Otherwise, it
can get messy possibly.

Hang in
me
 
T

Tony Toews

Sorry but I have got stuck on the simple things. Don't want to use
auto number. I have a REF Field starting at 101. I want to increment
this by 1 every time I enter a new record, thanks

ACC2000: How to Create a Multiuser Custom Counter
http://support.microsoft.com/default.aspx?scid=kb;en-us;210194

How To Implement Multi-user Custom Counters in DAO 3.5
http://support.microsoft.com/default.aspx?scid=kb;en-us;191253
How To Implement Multiuser Custom Counters in Jet 4.0 and ADO 2.1
http://support.microsoft.com/default.aspx?scid=kb;en-us;240317

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
 

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