February 17th, 2003, 04:43 PM
Comparing Two Values
If Form_Prospects_Restrictions.Value > Communication_Number.Value Then
Communication_Date.Value = Format(Now, "mm dd yy")
the 2 values i am comparing are from different forms. one a parent form (prospects) and one a subform (communication).
i am getting the error message "object required". how can i make the form (communication) recognize the restrictions field from the prospects form? is this the problem? thanks.
February 18th, 2003, 12:23 AM
if your are referring to a control on a form i believe you need to call it as in
if its a text box i think it should be
....however you may have to set focus first on the relevant controls to get the value.
dim val1 as String, val2 as String
val1 = MyForm.MyControl.Value
val2 = MyForm.MyControl.Value
then do your comparison with val1 and val2.
hope that helps....if thats what you were trying to accomplish.
February 18th, 2003, 12:26 AM
sorry forgot to mention this:
If(val1 > val2) Then
............ Relevant code here
February 18th, 2003, 01:01 PM