Search using two criteria on form

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

Access 2000. I have an employee db. I need a way to perform a search of
the employee id # and a specific date and have that date show up on my form
for editing. Thanks...Randy
 
In the query for your form record source on the FIELD row put --
Event Date: [Enter date of event]

In the CRITERIA row below the EmployeeID field put --
[Enter Employee number]

In the CRITERIA row below the EventDate field paste a copy of [Enter date of
event] because this must match exact as was entered in the FIELD row above.
 
The description you provided is not really clear but if you are trying to
open a form with a specific employee id, and you know these in advance, and
with a specific date that you know is connected to that record.
You can build a query using the fields you need from whatever table(s)
contain the data. Then in the criteria field of the employee id, type:
[Enter Employee ID]
or if you want it to be less rigid:
Like "*" & [Enter Any Part of Address] & "*" (This uses wildcards and may
bring up more than one record for the date you select).

For the date, in the criteria field of the Date, type: [Enter a Date in
mm/dd/yyyy]
or for a less rigid approach, use: Between [Enter Starting Date in
mm/dd/yy Format] And [Enter Ending Date in mm/dd/yy Format] (Again, this
may puoll up multiple records when combined with the employee id).

HTH,
Al
 
This is fine if I only wanted to run a query. What I need, is from my data
entry form I need a button that i can click asking for the employee Id and
the date. Next the form goes to this speciic record so I can review or edit
it..Thanks..Randy.
KARL DEWEY said:
In the query for your form record source on the FIELD row put --
Event Date: [Enter date of event]

In the CRITERIA row below the EmployeeID field put --
[Enter Employee number]

In the CRITERIA row below the EventDate field paste a copy of [Enter date
of
event] because this must match exact as was entered in the FIELD row
above.

Randy said:
Access 2000. I have an employee db. I need a way to perform a search of
the employee id # and a specific date and have that date show up on my
form
for editing. Thanks...Randy
 
I will not necessarily know the Employee Id prior to opening the form. This
search needs to be done from the form. A means of going to a specific date
and employee Id number , maybe days or weeks later for review or editing
incorrect data. From the form not query...Thanks...Randy
Al said:
The description you provided is not really clear but if you are trying to
open a form with a specific employee id, and you know these in advance,
and
with a specific date that you know is connected to that record.
You can build a query using the fields you need from whatever table(s)
contain the data. Then in the criteria field of the employee id, type:
[Enter Employee ID]
or if you want it to be less rigid:
Like "*" & [Enter Any Part of Address] & "*" (This uses wildcards and may
bring up more than one record for the date you select).

For the date, in the criteria field of the Date, type: [Enter a Date in
mm/dd/yyyy]
or for a less rigid approach, use: Between [Enter Starting Date in
mm/dd/yy Format] And [Enter Ending Date in mm/dd/yy Format] (Again,
this
may puoll up multiple records when combined with the employee id).

HTH,
Al

Randy said:
Access 2000. I have an employee db. I need a way to perform a search of
the employee id # and a specific date and have that date show up on my
form
for editing. Thanks...Randy
 
Back
Top