Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update records 2

Status
Not open for further replies.

xtraterrestrial

Programmer
Sep 23, 2003
38
0
0
CA
When I make some changes to a record from a form the values don't seem to get updated immediately. I have to move to another record and move back before the new values show

Is there a command that lets me update the records instantly?

 
As soon as you leave a field that record is updated. Are these fields calcuated fields or just fields from a table? If they're calculated, you might have to add a Me.Requery in that field's AfterUpdate property.

Jim DeGeorge [wavey]
 
Try a Requery; it reruns the underlying query (vs. closing & re-opening it). One caveat- after the Requery fires, you'll be positioned to the 1st record in the recordset (bookmarks don't help; they're destroyed by the requery)
 
Me.Requery in the field's AfterUpdate property will not push you to the 1st record.

Jim DeGeorge [wavey]
 
I stand corrected. We've got a department grudge against AfterUpdate; it's bit us in the ass over & over again.
 
Me.Requery seems to also reset all my public variables in the form

Can I do something like Me.Requery("FieldName") to just update the field or record
 
Me.Requery isn't just for the one field. If the variable are public, they shouldn't be reset unless they're defined in the form and not in a module somehwere else.

Jim DeGeorge [wavey]
 
I have two side-by-side workstations looking at the database on the network. When I change the selection in a combobox on the first workstation, the data doesn't update on the second workstation until I select a different record on the first workstation. Placing Me.Requery in the AfterUpdate event didn't work for me.
 
rGlad to hear you got it working. You get a star for solving it yourself!

Jim DeGeorge [wavey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top