D
DJW
When I open Form1 (frm1), I am trying to compare the caption value of a
label (Label19) located on Form2 (frm2) to the current date. I would like
to use a If/Then statement.
The current code I am trying to use does not work. I believe it is because
I am not referencing the caption value properly. Here is what I have as the
code on frm1:
Private Sub Form_Open(Cancel As Integer)
If Forms!frm2.Label19.Caption = Now() Then
Msgbox "Sell item today!"
End If
End Sub
Any help would sure be appreciated. Thank you.
label (Label19) located on Form2 (frm2) to the current date. I would like
to use a If/Then statement.
The current code I am trying to use does not work. I believe it is because
I am not referencing the caption value properly. Here is what I have as the
code on frm1:
Private Sub Form_Open(Cancel As Integer)
If Forms!frm2.Label19.Caption = Now() Then
Msgbox "Sell item today!"
End If
End Sub
Any help would sure be appreciated. Thank you.