Requery After Update

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

Guest

hi,
I currently have 2 users running and inputting data on the same form, 2 page
tabs on the form.
After each user has inputed their data i have written the code

After update ()
Me.Requery

The problem is once they enter data into the field it is no longer following
the tab index, its jumping right to the last tab.
How do i stop this happening?

Thanks

CR
 
hi,
I currently have 2 users running and inputting data on the same form, 2 page
tabs on the form.

Clarification please: are they using the same keyboard, the same
monitor, and the same instance of the database? Or are they at
different computers? If so, they are *NOT* using "the same form";
they're each using their own instance of the form, updating the same
Table.
After each user has inputed their data i have written the code

After update ()
Me.Requery

The problem is once they enter data into the field it is no longer following
the tab index, its jumping right to the last tab.
How do i stop this happening?

Requerying the form will actually rerun the form's Recordsource query,
and jump to the first record in that query's results. I don't think it
will have the effect that you want!

Are you assuming that the *FORM* contains the data? It doesn't; it's
just a window on the data in the tables, and if two users are both
connected to the same table using their own forms, either user could
be viewing any record in the table.

John W. Vinson [MVP]
 
Yep your right, sorry for the bad info,
They are on seperate PCs, using their own FE, both updating to the same
Backend.

Cheers
 
Yep your right, sorry for the bad info,
They are on seperate PCs, using their own FE, both updating to the same
Backend.

In that case, the Requery probably doesn't accomplish anything at all,
other than disrupting that user's view of the data. They need to save
the record to disk to make it available to the other user. This

Note that Access will pop an error if two users are attempting to edit
the same record at the same time. You may need to rethink your
database architecture if this is something that you need to do
routinely!

John W. Vinson [MVP]
 
It is something that is going to be done v frequently through the day, as the
form records production data,each input value and output value to calculate
yields etc. Iv put the requery on a timer for now and it seems to be ok at
the moment (quick test cos i was due to leave work 4 hours ago)

Both users are adding data to the same record (batch) , i was under the
impression when requery runs it would just update the users form to match
what the other user has also inputted? am i wrong in assuming this? Not sure
how i would go about redesigning this part... if i had to.

Cheers

Craig
 
Both users are adding data to the same record (batch) , i was under the
impression when requery runs it would just update the users form to match
what the other user has also inputted? am i wrong in assuming this? Not sure
how i would go about redesigning this part... if i had to.

I believe that you want to Refresh the form to detect the other user's
input - not Requery. Or you might need to do both.

John W. Vinson [MVP]
 

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