?
Solved

Multiple Users w/autonumber

Posted on 1998-06-17
6
Medium Priority
?
223 Views
Last Modified: 2008-03-06
I have multiple users on a network.  I have a customerform, with a main form button to list all workorders in a datasheet view.  The problem that has been persistant for the past couple of weeks is the autonumber.  Example, If I enter something in a textbox, it automatically generates number 12, for workorder # 12.  If I don't refresh or requery my form before I enter in another workorder, then the autonumber missmatches with the record selector on the bottom left hand of the page.  Example, Workorder # 12, will be #13 on the record selector.  Is there anything I can do so I don't have to keep refreshing or requerying to enter the next record?
0
Comment
Question by:scorp8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 6

Accepted Solution

by:
devtha earned 120 total points
ID: 1975455
If the mainform is based on a query the use requery.
Or..
    On form activate event use forms.refresh or
fieldname.requery
Assuming that the field that gets 12 has some type of query or expression which brings that value 12.
Devtha
0
 
LVL 1

Author Comment

by:scorp8
ID: 1975456
Devtha

I don't understand what you mean on the above comment?

Currently on my customerform I have a refresh and requery button for each individual user to push before entering in a workorder.  If they don't push each button before they enter a new account, the autonumber will skip.  Causing an unever autonumber and record selector.  This is critical because when they view the main page, there is a dblclick feature on the autonumber to pull up that specific workorder to the main form.  Sorry if this is confusing..
0
 
LVL 6

Expert Comment

by:devtha
ID: 1975457
It is not a good idea to make a user go for an extra step like clicking a button in your case. You need to make that automatic. Try to use the underlying code of the button on the open or activate event of the form. Or you can also put it on the getfocus of the first dataentry field of the form. This way every time a user enters a new record starting from the first field he/she will get the autonumber , and they do not have to click that button.
Devtha
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 1

Author Comment

by:scorp8
ID: 1975458
Devtha
I understand what you saying, and I agree.  They shouldn't have to take an extra step in clicking another button, but if they don't requery than "user A" will be entering in an account at the same time "user B" is entering in an account and it issues two separate autonumbers and recordselectors, but for some reason it tends to throw the numbers off from time to time.  I'm curious if this is a refresh interval problem!?!?!
0
 
LVL 6

Expert Comment

by:devtha
ID: 1975459
I am not saying you should not requery.
What is your code on the requery button?
Take that code (copy it) and paste it on some event that should fire everytime a user tries to enter a new record.
Lets say a PArtID is the first field you are going to enter on a form then, you need to go to that field in design mode, go to the exit event type something like this:
if not isnull([partid]) then
'requery code from the button you have
end if
Devtha
0
 
LVL 1

Author Comment

by:scorp8
ID: 1975460
I appreciate your help, Thanks!!
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question