no results with dialog box

chrisl

New member
Local time
Today, 22:33
Joined
Nov 5, 2001
Messages
9
Hello,

I have a query that runs great when I explicitly state a
value in the criteria area in the query grid.

However, when I try to run it through a dialog box using <
[enter value] in the query grid and I get no
results...even when I use the exact value I explicitly
stated.

The sql statements are included below.

Any tips or extra details are greatly appreciated by this
newbie.

Have a great day,
christi


This works:

SELECT Clients.[Social_ Security], tblPeriodInter.Period,
tblPeriodInter.StrtDt, tblProjected_Resources.PRDesc,
tblPR_Amount.PRAmt, Clients.[Last Name], Clients.[First
Name]
FROM tblProjected_Resources INNER JOIN (Clients INNER JOIN
(tblPR_Amount INNER JOIN tblPeriodInter ON
(tblPR_Amount.Period = tblPeriodInter.Period) AND
(tblPR_Amount.Social_Security =
tblPeriodInter.Social_Security)) ON Clients.[Social_
Security] = tblPeriodInter.Social_Security) ON
tblProjected_Resources.PRID = tblPR_Amount.PRID
WHERE (((Clients.[Social_ Security])="111-00-2222"));

This produces no results:

SELECT Clients.[Social_ Security], tblPeriodInter.Period,
tblPeriodInter.StrtDt, tblProjected_Resources.PRDesc,
tblPR_Amount.PRAmt, Clients.[Last Name], Clients.[First
Name]
FROM tblProjected_Resources INNER JOIN (Clients INNER JOIN
(tblPR_Amount INNER JOIN tblPeriodInter ON
(tblPR_Amount.Period = tblPeriodInter.Period) AND
(tblPR_Amount.Social_Security =
tblPeriodInter.Social_Security)) ON Clients.[Social_
Security] = tblPeriodInter.Social_Security) ON
tblProjected_Resources.PRID = tblPR_Amount.PRID
WHERE (((Clients.[Social_ Security])<[enter social
security number]));
 
Leave out the < and just put [Enter Social Security Number] in the Criteria line...

As an aside I would suggest you have a form with a combo box of ss numbers. Let the user start to type in the ss number they want and the combo box will start moving towards that number. Selecting a ss number this way will insure that the user does not enter an incorrect or nonexistant ss number. You can then have a button on the form to open a form to display the information in the query or you can just run the query. If you use this approach then instead of [Enter SS Number] in the criteria line you would have code similar to this: [Forms]![NameOfFormWithComboBox]![ComboBoxName].

If you have more questions just let us know...

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom