G
Guest
Hello all. I hope this is in the right place, I haven't used the MS
newsgroups before.
Code:
Private Sub Form_Current()
If (txtPcDate.Value > date And txtAdmDate.Value > date And
txtClinDate.Value > date) Then
cboCurrent.Value = True
ElseIf (cboCurrent.Value = True) Then
cboCurrent.Value = False
End If
DoCmd.GoToControl ("txtName")
End Sub
The database contains two tables with slightly different fields
(unfortunately I am not able to collapse them into one table) so I have two
almost identical forms to use to enter data into the tables.
On the first form, the above code works perfectly, but on the second form I
would only get the DoCmd working. The object names are all correct.
When I replaced [txtPcDate.Value > date And txtAdmDate.Value > date And
txtClinDate.Value > date] with [true] it did execute. What has me stumped is
that I am using exactly the same code and test dates in both forms but the
conditional doesn't evaluate the same on the second form.
newsgroups before.
Code:
Private Sub Form_Current()
If (txtPcDate.Value > date And txtAdmDate.Value > date And
txtClinDate.Value > date) Then
cboCurrent.Value = True
ElseIf (cboCurrent.Value = True) Then
cboCurrent.Value = False
End If
DoCmd.GoToControl ("txtName")
End Sub
The database contains two tables with slightly different fields
(unfortunately I am not able to collapse them into one table) so I have two
almost identical forms to use to enter data into the tables.
On the first form, the above code works perfectly, but on the second form I
would only get the DoCmd working. The object names are all correct.
When I replaced [txtPcDate.Value > date And txtAdmDate.Value > date And
txtClinDate.Value > date] with [true] it did execute. What has me stumped is
that I am using exactly the same code and test dates in both forms but the
conditional doesn't evaluate the same on the second form.