If Me.txtstatus Like "SP" Then Me.txtlbl1.Visible = True (1 Viewer)

mrrayj60

Registered User.
Local time
Yesterday, 19:43
Joined
Sep 3, 2009
Messages
103
Hey All, need a little help with one.

Using this in the On Open of my form.

If Me.txtstatus Like "SP" Then Me.txtlbl1.Visible = True

But the SP in the record status is sometimes preceded by PO-SP or LI-SP

My code only works if the SP is the leading characters SP-PO.

I've looked thru the wildcards but I end with errors when opened.

Thanks for your help and time.
Rayj
 

John Big Booty

AWF VIP
Local time
Today, 09:43
Joined
Aug 29, 2005
Messages
8,263
Try;
Code:
If Me.txtstatus Like "*SP*" Then 
     Me.txtlbl1.Visible = True
Else
     Me.txtlbl1.Visible = False
End If
 

boblarson

Smeghead
Local time
Yesterday, 16:43
Joined
Jan 12, 2001
Messages
32,059
You can use:
Code:
If Me.txtstatus Like "*SP*" Then Me.txtlbl1.Visible = True

Or you could use
Code:
If Instr(1, Me.txtstatus, "SP")> 0 Then Me.txtlbl1.Visible = True
 

mrrayj60

Registered User.
Local time
Yesterday, 19:43
Joined
Sep 3, 2009
Messages
103
* inside the quotes, Works like a charm...Thanks Bob & John, It's been awhile since I needed you guys last, the program is handling 2800 homes in a Homeowner Association and till now handling most everything with ease. Thanks Again, Ray
 

Users who are viewing this thread

Top Bottom