Prompting users and looking up data multiple times

C

Cita

I took an intensive Access 2003 course and have accidentally become the
expert at work.

I've built several queries in which I'll have to prompt the user to enter a
4-digit number. Now, I need to figure out how to connect that number with a
table and do some lookups. I've written the exact process below:

User is prompted and enters the pay period number.
Pay period number is found in the PPTBL and its corresponding start and end
dates.
Then, within the same query,
[REPDT] <= pay period start date
[RELDT] >= pay period end date

From there, I hope to get what I'm looking for. Any suggestions?

Thanks!
 
K

KARL DEWEY

Post your table and field names with datatype. A sample of your data would
also help.
 
J

John Spencer

Field: REPDT
Criteria: <= DLookup("[PayPeriodStart]","PPTbl","PayPeriod=""" & [Enter
Pay Period] & """")

If Payperiod is a number field - change the three quotes to one quote
and remove the trailing & and four quotes.

There are probably better alternatives for this, but without more
information about your table structure, this will be the best I can suggest.


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Top