Select data from double clicking

mtagliaferri

Registered User.
Local time
Today, 14:29
Joined
Jul 16, 2006
Messages
550
Hi all, I have a query to recall all the events related to a certain employee by running a query and inserting the staff number, I then have a form showing the details of all employees; what I need is to add a button on the form that runs the mentioned query without having to insert the staff number again as the form is already showing that employee.
Thanks
Marco
 
In the QBE grid, set the query's criteria to be the id (set the form field to be the criteria) of the employee instead of your [enter employee id] criteria. Then, when the query is opened via the form it will show the data only applicable to that employee.
 
:( seem very easy...but for a beginner as me ..... I am lost, can you give me further instructions, I have to launch the query from a push button!!
Thanks
 
Check out the sample I attached. Open the form and select an employee from the list (probably the 2nd or 3rd one as they have details in the table) and click the button.

Go into the query to see how it's done.
 

Attachments

Thanks Bob, It is pretty much what I need, the only thing is that the form frmFormTest will already display the employee, and not from a drop list. But this is a good start I will look into it in the next days, if I have problems I will come back to you.
Thanks again.
Marco
 
This Is actually what I am trying to achive, I can select the employee from the recordselector in the frmFormTest, once it shows the desired employee by pressing the qry button it will show me then the details!
 

Attachments

Just change the criteria under ID in the query from
Code:
Forms]![frmFormTest]![Combo0]
to
Code:
Forms]![frmFormTest]![ID]
 
:)..... Was so obvious.... but couldn't see it!!!
Thanks for your help, was really appreciated!
Marco
 

Users who are viewing this thread

Back
Top Bottom