Solved

Multiple Users w/autonumber

Posted on 1998-06-17
6
197 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
  • 3
  • 3
6 Comments
 
LVL 6

Accepted Solution

by:
devtha earned 30 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

773 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