opening a form from a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a clients info form and then i want to be able to click on a button
and view additional client info. How can i do it that the client who is on
screen automatically will be opened on his info and no-one else should be in
the form at all?
Until now i just based the second form on a parameter query of client id and
everytime i click on the button i just enter the id number. Is there any way
to do it without this?
 
You can do it in much the same way, only referencing the ClientID
control on the open form in your query criteria, instead of requesting
user input. Assuming the form is named MyForm and the control is named
txtClientID, the criterion in the query should be:

[Forms]![MyForm]![txtClientID]

Of course, you can do it in more elegant ways (no saved query) with a
bit of code, either by (a) binding the client form to the table and
imposing a filter on opening it, or (b) by making the second form
unbound, and assigning an SQL query recordset in its On Open event. The
end result will be exactly the same.

HTH,
Nikos
 
Back
Top