UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Query Prompt To Look At Two Different Fields    
 
   
goss
post May 6 2012, 06:56 PM
Post #1

UtterAccess Enthusiast
Posts: 63



Hi all,

Using Access 2007.

I would like to setup a query to prompt user to to input two values (usually a copy paste from another document)
I need to test 2 different fields, 1 live, 1 archive for a customer number

I tried setting up in the query design grid
I entered this on the criteria line for Field 1 Like "*" & [Text ?] & "*"
And same on the OR line for Field 2

But I only receive one prompt?
What can I do so I am always prompted to enter a value in bother fields

thx
w
Go to the top of the page
 
+
ReyObrero
post May 6 2012, 07:04 PM
Post #2

UtterAccess Addict
Posts: 138
From: Seattle, WA



for the first field, you already used

Field 1 Like "*" & [Text ?] & "*"

so use another variable for field 2

Field 2 Like "*" & [Text2 ?] & "*"
Go to the top of the page
 
+
fkegley
post May 7 2012, 09:05 AM
Post #3

UtterAccess VIP
Posts: 23,583
From: Mississippi



I would suggest you use a form that contains two text boxes. The user will then fill in the values he wants to use for each text box, you will of course explain to him/her which value is which on the form. You could use combo boxes, list boxes, date/time pickers, etc., whatever controls seem appropriate for the values.

Then modify the query to use the values in the form controls as the criteria values.

In the appropriate Criteria: cells, place a reference to the form control, like this: [Forms]![NameOfForm]![NameOfControl]

Place a button on the form to open the query.

By using a form you can present the user with a list of correct values to pick from.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 21st May 2013 - 10:05 PM