Discussion Locked

Like in Access 2000 for a form control

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Does anyone know the format in a query's criteria to write the expression

Like "*[Forms]![Frm_S1]![S1Crit]*"

I want the user to be able to enter the criteria on the form in a text box and then have the query look for items that are like that value.

Thanks a bunch!!

5 replies

by sl-campbell

WHERE Customer LIKE '" & Me.TextBox1.Text & "*'

Make sure that you use the single quotes.

(The "Me." can be omitted)

by basit_jafri

Campbell is right.

Actually everyone knows the exact SQL which runs on Oracle or SQL Server.

Actually SQL Server 7 and above and Oracle support ANSI 92 version of SQL while MS Access continues to use ANSI 89 version which is different from theone we all know. So if ur making a db and writing queries in Access and u ever plan to upgrade to SQL server or Oracel, u'll b dead ......... i'll find u writing queries agian.

But if u want to stay with the standard, fortunately it is possible to tell Access to start supporting ANSI 92

You can do this by

1. Click Tools menu and select Options
2. Click on Tables/Queries Tab
3. In SQL Server Compatibility Syntax area, check the checkbox named "This Database", and then start making ur database.

If u already have a database made and queries written, better not do this, as it may effect ur existing queries and will cause them to stop running.. better to do this with a DB ur starting to make or backup the copy of ur db b4 taking this step

but working with ANSI 92 will b benefitted definitely in future.

Enjoy!!!!

This discussion is closed to new replies.