UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Values in a combo box    
 
   
BevanUK
post Sep 18 2005, 06:20 AM
Post #1

New Member
Posts: 17



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??
Attached File(s)
Attached File  EScalatioons.zip ( 107.54K ) Number of downloads: 8
 
Go to the top of the page
 
+
ScottGem
post Sep 18 2005, 10:19 AM
Post #2

UtterAccess VIP / UA Clown
Posts: 25,021
From: LI, NY



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?
Go to the top of the page
 
+
BevanUK
post Sep 21 2005, 03:13 PM
Post #3

New Member
Posts: 17



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?
Go to the top of the page
 
+
BevanUK
post Sep 21 2005, 04:14 PM
Post #4

New Member
Posts: 17



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?
Go to the top of the page
 
+
ScottGem
post Sep 21 2005, 07:30 PM
Post #5

UtterAccess VIP / UA Clown
Posts: 25,021
From: LI, NY



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"
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th May 2013 - 02:29 PM