Using Wild cards in event procedure

G

Guest

I have a form with a text box called customer and I am trying to get a hidden
text box and list box to show if the customer name matches a certain
Criteria. Like all customers with the name Joe *. Joe Smith, Joe Adams,
etc.

I Have this on the forms "on current event:

Me.Text141.Visible = Me![Customer] = "Joe Smith"

The hidden text box and list box show, but I need to be able to have it show
any time I the customer name has Joe in it.
Also, once the list box shows I need to be able to select the right "Joe"
and open the form to that record.

Can anyone help me with this?

Thanks
 
T

Tom Lake

Rick Matheson said:
I have a form with a text box called customer and I am trying to get a
hidden
text box and list box to show if the customer name matches a certain
Criteria. Like all customers with the name Joe *. Joe Smith, Joe Adams,
etc.

I Have this on the forms "on current event:

Me.Text141.Visible = Me![Customer] = "Joe Smith"

The hidden text box and list box show, but I need to be able to have it
show
any time I the customer name has Joe in it.

Try this:

Me.Text141.Visible = Me![Customer] Like "Joe*"

Tom Lake
 
G

Guest

That worked, but how do I do this if I have more than the name Joe to search
for? It might me a Customer Name of Sally* or Jeff* or Alex*.

Thanks

Tom Lake said:
Rick Matheson said:
I have a form with a text box called customer and I am trying to get a
hidden
text box and list box to show if the customer name matches a certain
Criteria. Like all customers with the name Joe *. Joe Smith, Joe Adams,
etc.

I Have this on the forms "on current event:

Me.Text141.Visible = Me![Customer] = "Joe Smith"

The hidden text box and list box show, but I need to be able to have it
show
any time I the customer name has Joe in it.

Try this:

Me.Text141.Visible = Me![Customer] Like "Joe*"

Tom Lake
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top