query with drop-down menu

  • Thread starter Thread starter tracktraining
  • Start date Start date
T

tracktraining

Hi All,

I wrote the following query for a report.

SELECT A.FirstName, A.LastName, A.DocID, A.Revision, A.DateCompleted,
A.JobFunc
FROM LatestRev AS A
WHERE ((([Enter Document Number])=A.DocID) And (([Enter Job
Function])=A.JobFunc))
ORDER BY A.FirstName, A.LastName, A.Revision;


The place where I have [Enter Job Function], this allows the user to enter a
job function, BUT is there a way to have it to be a drop-down menu and then
the user can just select the job function?

- Thanks,

Tracktraining
 
Hi All,

I wrote the following query for a report.

SELECT A.FirstName, A.LastName, A.DocID, A.Revision, A.DateCompleted,
A.JobFunc
FROM LatestRev AS A
WHERE ((([Enter Document Number])=A.DocID) And (([Enter Job
Function])=A.JobFunc))
ORDER BY A.FirstName, A.LastName, A.Revision;


The place where I have [Enter Job Function], this allows the user to enter a
job function, BUT is there a way to have it to be a drop-down menu and then
the user can just select the job function?

Certainly. Create a little unbound form frmCrit and put a combo box on it
named cboJobDocumentNumber, based on a query selecting all distinct job
numbers; use a criterion

A.DocID = [Forms]![frmCrit]![cboJobDocumentNumber]

To the same for job functions.

It's convenient to open this form *INSTEAD* of the report, and put a command
button on the form to open the report; or, you can open frmCrit in the
report's Open event, and close it in the report's Close event.
 
thank you. I will take the form approach then.

--
Learning


John W. Vinson said:
Hi All,

I wrote the following query for a report.

SELECT A.FirstName, A.LastName, A.DocID, A.Revision, A.DateCompleted,
A.JobFunc
FROM LatestRev AS A
WHERE ((([Enter Document Number])=A.DocID) And (([Enter Job
Function])=A.JobFunc))
ORDER BY A.FirstName, A.LastName, A.Revision;


The place where I have [Enter Job Function], this allows the user to enter a
job function, BUT is there a way to have it to be a drop-down menu and then
the user can just select the job function?

Certainly. Create a little unbound form frmCrit and put a combo box on it
named cboJobDocumentNumber, based on a query selecting all distinct job
numbers; use a criterion

A.DocID = [Forms]![frmCrit]![cboJobDocumentNumber]

To the same for job functions.

It's convenient to open this form *INSTEAD* of the report, and put a command
button on the form to open the report; or, you can open frmCrit in the
report's Open event, and close it in the report's Close event.
 
Back
Top