?
Solved

Multiple Users w/autonumber

Posted on 1998-06-17
6
Medium Priority
?
226 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

650 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