S
Scott
I have a program with a parent form and two subforms (subform A and subform
B), each subform is located under a separate tab. In subform B I have an
unbound txt box (txtweight) and also a command button to run a report. In
subform A I have a ‘weight’ field. I’ve written code so that if a person
enters a weight in subform B, it’s automatically recorded in the weight field
of subform A. This works well and if I go from subform B to subform A and
then back to subform B to print the report, this works fine too. My problem
is that if I enter the weight on subform B and then immediately press the
button to print my report, the weight has not yet been written to the subform
A control source for weight and, consequently, doesn’t show up on the report.
I’ve played around with Me.Requery, Me.Refresh, wrote a short recordset
program to try to write it to the file, etc.; obviously if one of these
approaches is correct then I must be putting it in the wrong event? Any
words from the wise would be appreciated.
B), each subform is located under a separate tab. In subform B I have an
unbound txt box (txtweight) and also a command button to run a report. In
subform A I have a ‘weight’ field. I’ve written code so that if a person
enters a weight in subform B, it’s automatically recorded in the weight field
of subform A. This works well and if I go from subform B to subform A and
then back to subform B to print the report, this works fine too. My problem
is that if I enter the weight on subform B and then immediately press the
button to print my report, the weight has not yet been written to the subform
A control source for weight and, consequently, doesn’t show up on the report.
I’ve played around with Me.Requery, Me.Refresh, wrote a short recordset
program to try to write it to the file, etc.; obviously if one of these
approaches is correct then I must be putting it in the wrong event? Any
words from the wise would be appreciated.