Select from TextBox

  • Thread starter Thread starter Esperanza
  • Start date Start date
E

Esperanza

Hello Access Expert !!

The following sql string is not working anymore in Access 2002.
The problem is the * that we put at the end of the criteria to fetch the
data.

Any idea ?
Thanks in advance !!
Esperanza

'---------------------------------------------------------------------------
---------------
Me.nomcli.Text = Me.nomcli.Text + "*"
sql = "SELECT [SIGSAC Central].* FROM [SIGSAC Central] WHERE
(((CLI_NOM)= [Forms]![formfinRecherche]![nomcli].Value));"

Me.RecordSource = sql
 
When you use the asterisk, you need to use LIKE, not =
you also need to surround the mask in quotes

WHERE CLI_NOM LIKE '" & [Forms]![formfinRecherche]![nomcli]
& "'"

Warm Regards,
Crystal
MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)
 

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

Similar Threads


Back
Top