use part of a field as a parameter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to trigger a messagebox if a user enters a name which may refer
to two or more different customers from a combo box on the input form.
(CustID is primary key) . I tried to run query on the after update event, use
the Name as a parameter( "*"&[parameter]&"*" ) then use movelast and
recordcount to see how many records are in the query. trouble is if the name
is similar it doesn't work (St John's Wrexham) (St Johns Service Station) (St
Johns garage) how can I extract say the first 7 letters from the name to use
as the parameter.
 
Thanks very much most appreciated

Klatuu said:
"*" & Left([parameter], 7) & "*"

mike said:
I am trying to trigger a messagebox if a user enters a name which may refer
to two or more different customers from a combo box on the input form.
(CustID is primary key) . I tried to run query on the after update event, use
the Name as a parameter( "*"&[parameter]&"*" ) then use movelast and
recordcount to see how many records are in the query. trouble is if the name
is similar it doesn't work (St John's Wrexham) (St Johns Service Station) (St
Johns garage) how can I extract say the first 7 letters from the name to use
as the parameter.
 

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

Back
Top