I'm very new to VB coding, so I am probably not doing this right. I have a field called PRIMARYDWELLINGVALUE that is filled in with a Currency amount (no decimals). There's a button that, once clicked, should display a message (CITIZENS) if the value entered in the field is between $149,999 and $750,001. Otherwise, it should not display. I've tried doing the code with and without commas, with and without dollar signs, etc. I can't seem to get it to work. Right now when I click the button with a "0" or "1" in the field, it does not display the message. But anything 2 and above displays the message. What am I doing wrong?
Private Sub PRIMARYBUTTON_Click()
If Me![PRIMARYDWELLINGVALUE] > "149,999" And Me![PRIMARYDWELLINGVALUE] < "750,001" Then
Me.CITIZENS.Visible = True
Else
Me.CITIZENS.Visible = False
End If
End Sub
Also, I'm going to end up having a long list of requirements for the message to display, based on multiple fields. In VB, what is the best way to accomplish this? Would you just keep sasying If...And...And...And...And...etc.?
Private Sub PRIMARYBUTTON_Click()
If Me![PRIMARYDWELLINGVALUE] > "149,999" And Me![PRIMARYDWELLINGVALUE] < "750,001" Then
Me.CITIZENS.Visible = True
Else
Me.CITIZENS.Visible = False
End If
End Sub
Also, I'm going to end up having a long list of requirements for the message to display, based on multiple fields. In VB, what is the best way to accomplish this? Would you just keep sasying If...And...And...And...And...etc.?