BevanUK
Sep 18 2005, 06:20 AM
Hi Guys,
If i have a value in a drop down menu..
(Please see attached form "resolved")
The values in the drop down menu are drawn from a list of team leaders...
How i make a query search for that value in the main datasheet, i know how to link this part to a report.
But i cannot figure out how to make it search by a value that can be changed!!?!?
Password on the database is "monkey"
Can you help please??
ScottGem
Sep 18 2005, 10:19 AM
Not sure I follow what you want to do. Do you want to filter the form for all records for a specific team leader? Do you want to find the record for a specific team leader? Are you displaying the result on the main foirm, a subform or what?
BevanUK
Sep 21 2005, 03:13 PM
Sorry..
I wish for a combo (drop down box) to be there with a list of team leaders names in ... (which i have managed to do).
I need the value which will be selected (e.g. Dave Pendry)
To pull up a report on dave pendry... i can do the report part... but i dont know how to write the query which will find the value (which could be anybody) and open the report.
The there are about 27 different names in the combo box, and i need to be able to select one, which will then pull up the report for that name..
Does that make any more sense?
BevanUK
Sep 21 2005, 04:14 PM
hi guys..
iv managed to do a query that asks for the value that i wish to enter to search the database for.
Therefore when i open the report it asks for a team leaders name.
Im struggling to make the drop down menu automatically take the information it holds and open the report...
can aybody help?
ScottGem
Sep 21 2005, 07:30 PM
Ok, What you need to do is base your report on a query. In the query set the criteria for the Team Leader ID to:
=Forms!formname!controlname
where formname is the name of your form and controlname the name of the combobox. Then add a command button to kick off the report.
To make this work correctly, You should have a table for team leaders that looks like:
tblTeamLeaders
TeamLeaderID (PK Autonumber)
Firstname
LastName
etc.
You would then have the TeamLeaderID as a foreign key in your related tables. the RowSource of the combo would look like this:
SELECT TeamLeaderID, Lastname & ", " & Firstname As Fullname FROM tblTeamLeaders ORDER BY Lastname, Firstname;
The bound column would be 1, the Column Count would be 2 and the Column widths would be 0";2"
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.