-----Original Message-----
jac said:
New information: The controlsource is set to =[Forms]!
[frmOrderEntry_debug]![ctlSubForm]![txtSubTotal]
but if I remove the controlsource, the code will work
fine.
What I am trying to do is assign the textbox a value from
a subform. Inside of the "add record" button code I want
to get the value in the textbox and assign it to the a
variable. This is where the problem is.
You've lost me. What control source are you talking about?
If you have text box expression that calculates a value from
other text boxes and are trying to retrieve that value in
code, you could be running into a timing issue. If a
subform text box is trying to retrieve a value from a main
form text box, the subform may be trying to get the value
before the main form has loaded the data.
Other than those straw grasping thoughts, you should try
John's compile all suggestion.