Update (write) current record

hortense76

Registered User.
Local time
Tomorrow, 00:34
Joined
Mar 16, 2006
Messages
21
I have a small problem: I just want my form to update the current record because I'm opening (with a button) a second form which uses the values of some of its table fields.
If I open 2nd form without updating, it will use old values, and if the record I was worknig with is a NEW record, 2nd form simply can't find it because it's not been written!
So:
1. I want to tell the button to UPDATE record before opening the 2nd form.
2. In addition, I could want to go to 2nd form DIRECTLY from the same field I want to update and use in 2nd form (through a Keypress event instead of a button), but this is more difficuolt because I still didn't EXIT from the field but I already want to use the text manually updated in the field... any idea?

Thanks
 
For issue 1: Before you open the other form:
If Me.Dirty Then
DoCmd.RunCommand acCmdSaveRecord
End if
 
...It seems somehow rough but it also seems to work properly. :) Thank you very much RG!
 
Glad I could help. If you describe problem 2 in different terms, maybe I can help there also. I'm really having trouble understanding what you want to happen.
 
Nevermind, RG, I made it with problem 2 myself, your help was very useful. Thanks!
 

Users who are viewing this thread

Back
Top Bottom