Because you were checking for a literal string, containing ## signs. And
these are not there.
--
Thank you. Regards,
Bas Cost Budde, Holland
website at http://utopia.knoware.nl/users/hegedu
mail needs a k after the at
hey thanks for your code it works great, but why wouldn't my initial code
run?
Quote:
-----Original Message-----
Hi
yes, the first 2 numbers aren't important for me at the moment, the last
2 however are.
-----Original Message-----
I will assume that you are attempting to use ## as a wildcard match...
Private Sub setMenu()
Select Case Right(Me!txtRegionCode,2)
Case "00"
stDocName = "Menu"
Case "99"
stDocName = "Data Entry Menu"
Case Else
stDocName = "Manager Menu"
End Select
End Sub
Vba-LIKE operator difficulty
Hi,
The code below doesn’t work properly, the last IF condition is always
executed,
never the others although currently I was only entering 1000 (1st condition
satisfied) all the time, but “Menu” never opened, “Manager
Menu” does. Any
suggestions?
Thanks!
Private Sub setMenu()
If Me![txtRegionCode] = "##00" Then
stDocName = "Menu"
Else
If Me![txtRegionCode] = "##99" Then
stDocName = "Data Entry Menu"
Else
If Me![txtRegionCode] <> "##99" And Me![txtRegionCode] <> "##00"
Then
stDocName = "Manager Menu"
End If
End If
End If
End Sub
..
.