P
pburling
I have two textboxes on a form for data entry of Television Stations,
txtName and txtCall.
Both are bound.
The difference between a name and a call sign is that usually the Name
has "-TV" at the end, and the Call sign does not. WXYZ-TV, for example,
is the Name. WXYZ is the Call sign.
So the user doesn't have to type the name in twice, I have coded in the
afterUpdate event of txtName so
txtCall takes the value of txtName. That is fine.
I can also cut off the "-TV" from the name by putting
Me.txtCall = Left([txtCall],Len([txtcall]) -3)
in the afterUpdate event of txtName.
Works fine.
Problem: Sometimes a station's name does NOT have "-TV" in the NAME!
So,
I wrote
If Me.txtName = "*-TV" then
Me.txtCall = Left([txtCall],Len([txtcall]) -3)
End If
But I am obviously doing something wrong as the wildcard isn't read as
a wildcard. Whatever is inside the quotes is taken literally. How do I
ask it to look for anything ending in "-TV"
I appreciate the help as I am a newbie to access.
Thanks
Peter
txtName and txtCall.
Both are bound.
The difference between a name and a call sign is that usually the Name
has "-TV" at the end, and the Call sign does not. WXYZ-TV, for example,
is the Name. WXYZ is the Call sign.
So the user doesn't have to type the name in twice, I have coded in the
afterUpdate event of txtName so
txtCall takes the value of txtName. That is fine.
I can also cut off the "-TV" from the name by putting
Me.txtCall = Left([txtCall],Len([txtcall]) -3)
in the afterUpdate event of txtName.
Works fine.
Problem: Sometimes a station's name does NOT have "-TV" in the NAME!
So,
I wrote
If Me.txtName = "*-TV" then
Me.txtCall = Left([txtCall],Len([txtcall]) -3)
End If
But I am obviously doing something wrong as the wildcard isn't read as
a wildcard. Whatever is inside the quotes is taken literally. How do I
ask it to look for anything ending in "-TV"
I appreciate the help as I am a newbie to access.
Thanks
Peter