Query criteria row entry (1 Viewer)

Lance R Peck

Registered User.
Local time
Today, 17:31
Joined
Feb 14, 2000
Messages
10
How can I create a form that will allow the text entered to be entered into the criteria row for a Select Query? Can this be done?

What I want to do is type search criteria into a form field and have it be the search criteria of a query.
 

Travis

Registered User.
Local time
Today, 10:31
Joined
Dec 17, 1999
Messages
1,332
In your query you will need to reference the form and field.

Example On a Form Called [frmSearch] I have a field called [txtCriteria]. To use this field in the query I will add this line to the criteria row:

Forms.[frmSearch].[txtCriteria]

Thats all you need. Just remember once this is in the query you will need the form open or it will keep asking you for a value.
 

Lance R Peck

Registered User.
Local time
Today, 17:31
Joined
Feb 14, 2000
Messages
10
Good, I've got that working now, thanks.

How can I use an * for the wild card. When I enter an * the search comes up blank.
 
D

Darren

Guest
Try

Like "*|[Forms]![Form Name]![Field]|*"

There may be an easier "newer" way to do it - my knowledge is a bit dated, but I think this will work for you.

Cheers
 

Lance R Peck

Registered User.
Local time
Today, 17:31
Joined
Feb 14, 2000
Messages
10
Thanks, that worked to broaden the search. Both Darren and Travis's expressions worked. I have implemited them both.
 

Users who are viewing this thread

Top Bottom