Could someone please tell me what I'm doing wrong here?
This is an event procedure in Access. It doesn't matter what I type in the NetWeight field, the box always pops up whether the number is below or above 125000. I would like the ability to limit the amount to 125000 or less with the ability to type in an over ride password for amounts over 125000. I haven't figured out how to do the password part either. As you can see I am a complete novice at this.
Private Sub NetWeight_Exit(Cancel As Integer)
Dim NetWeight As Integer
Dim strPrompt2 As String
Dim strTitle2 As String
Dim strResponse2 As String
strTitle2 = "PassWord Override"
strPrompt2 = "Please enter the override password"
strResponse2 = InputBox$(strPrompt2, strTitle)
If NetWeight <= 125000 Then
Exit Sub
Else
If NetWeight > 125000 Then
strResponse2 = InputBox$(strPrompt2, strTitle2)
End If
End If
End Sub
Thanks,
JMCK
This is an event procedure in Access. It doesn't matter what I type in the NetWeight field, the box always pops up whether the number is below or above 125000. I would like the ability to limit the amount to 125000 or less with the ability to type in an over ride password for amounts over 125000. I haven't figured out how to do the password part either. As you can see I am a complete novice at this.
Private Sub NetWeight_Exit(Cancel As Integer)
Dim NetWeight As Integer
Dim strPrompt2 As String
Dim strTitle2 As String
Dim strResponse2 As String
strTitle2 = "PassWord Override"
strPrompt2 = "Please enter the override password"
strResponse2 = InputBox$(strPrompt2, strTitle)
If NetWeight <= 125000 Then
Exit Sub
Else
If NetWeight > 125000 Then
strResponse2 = InputBox$(strPrompt2, strTitle2)
End If
End If
End Sub
Thanks,
JMCK