DS said:
I have 2 fields, both Number fields.
Whenever I run this if statemnet it always comes out Not Equal.
Any help appreciated.
Thanks
DS
If Me.Text0 = Me.Text2 Then
MsgBox "Equal"
ElseIf Me.Text0 <> Me.Text2 Then
MsgBox "Not Equal"
End If
This works, but there has to be a better way the problem is that
TxtDisplay must be a string and I need to make it an Integer. Is there
a way of doing that without Dim?
Thanks
DS
Me.TxtPass = Nz(DLookup("[Password]", "tblPasswords", "FormID = 1"), 0)
Dim PASSNUM As Integer
PASSNUM = Me.TxtDisplay
If PASSNUM < Me.TxtPass Or _
PASSNUM > Me.TxtPass Then
Me.Line16.Visible = False
Me.TxtDisplay = ""
Forms!frmPadNumber!LblDisplay.Caption = "PASSWORD"
DoCmd.OpenForm "frmMsgWarning"
Forms!frmMsgWarning!TxtMsg = "INVALID PASSWORD"
Else:
DoCmd.OpenForm "frmFX"
Me.TxtDisplay = Null
Forms!frmPadNumber!LblDisplay.Caption = ""
Forms!frmFX!TxtTaxRate = Forms!frmProServ!TaxRate
Forms!frmFX!TxtTerminalID = Forms!frmProServ!TerminalID
DoCmd.Close acForm, "frmPadNumber"
DoCmd.Close acForm, "frmProServ"
Dim blRet As Boolean
Dim lngColor As Long
lngColor = RGB(128, 128, 128)
blRet = RestoreMDIBackGroundImage(lngColor)
End If