Form doesn't always update when opened. Is this a requery problem?

piggitypow

Registered User.
Local time
Today, 14:44
Joined
Mar 19, 2005
Messages
19
Please refer to the attached file. The form of concern is frmAssessmentInput.

Select the appropriate criteria per instructions (in red), including entries on the continuous subform. Then click the "Input data" command button. A 2nd form opens (frmObservations) that contains a textbox labeled DocumentStreamID, and this textbox SHOULD contain the value from the corresponding DocumentStreamID textbox contained in the master form, where you clicked the command button. However, even though the sources are linked properly, the value doesn't pass if you click the command button immediately after adding a new record to the continuous form; it only passes if 1) the master form is closed and reopened first, or 2) if you close the 2nd form, toggle to design view and back to form view for the master form, and then click the "Input data" button again.

What is going on here? Given that the value passes once another procedure is run, do you think this a requery problem? I tried placing a VBA control requery in the 2nd form's On Current and On Load events, but this didn't solve things for me so I took out those event procedures (code could have been wrong though).
 

Attachments

sorry i did not have time to download your sample, but on your command button which opens the other form, try to save the record in your first form first, i.e.

before the docmd.openform statement try putting:

DoCmd.RunCommand acCmdSaveRecord
 
YAY! That worked.

Man, not being a programmer drives me mad sometimes.
 

Users who are viewing this thread

Back
Top Bottom