Using Wild cards in event procedure

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
Back
Top