Subform values from Main form

  • Thread starter smcgrath via AccessMonster.com
  • Start date
S

smcgrath via AccessMonster.com

I have searched all over for this answer and can't find one. I have a text
box on my main form that has a numeric value of 0.00 or 75.00 I would like to
know what event of the subform to use if I want a checkbox on the subform to
be checked yes if there is a value in the text box of the main form.

I had this code in the on Current event of the subform but I was getting
errors.

If Me.Parent.DischargeAmt >0 Then
Me.RegistryAmt = Me.Parent.DischargeAmt
Else
Me.RegistryAmt = ""
End If

Any suggestions?
 
K

Klatuu

Your object reference appears to be correct. I would be helpful to know what
error you are getting.
At first glance, the problem may be this line:
Me.RegistryAmt = ""

If the control RegistryAmt is bound to a numeric field, assigning a zero
length string would not be correct. You would want to assign either 0 or
Null.

S
 
Top