Command Button Problems

mugman17

Registered User.
Local time
Today, 15:24
Joined
Nov 17, 2000
Messages
110
I have a form with code behind a command button does a few calculations. Sometimes it needs to pull data from another record before it does this. All the calculations I have are correct, but sometimes the code does not work until I close the form and go back to that record again. I have added a save record button with the code in it, but it still doesn't work unless you close and then come back. Any ideas?
 
Does it hepen when you enter a new record??
 
Yes, it happens when I save the new record. Its supposed to calculate at that time. Sometimes it does not, especially when I am pulling data from another record with DLookup.
 
Sounds like you need to either use the Requery or Recalculate command after adding the new record.
 
I don't know what did yu write in your SAVE BUTTON.
I suggest, in calculation button, in front of other code
put this;
DoCmd.RunCommand acCmdSaveRecord
 

Users who are viewing this thread

Back
Top Bottom