Opening a form with parameters using Data Connection 
Author Message
 Opening a form with parameters using Data Connection

I have a frmClients bounded to a tblClients (access) and a frmProducts
(which is related to tlbClients as "one to many" by the noclient field).

I want to open the form frmProducts using the noclient as a parameter.

The result should be that when the user click the cmdButton to open the
frmProducts, it displays the products of the client which appears in the
frmClients.

Thanks for help.



Tue, 23 Apr 2002 03:00:00 GMT  
 Opening a form with parameters using Data Connection
Would it work if you set a global (or not) variable to the value you want
from formA and in the form Load (or Activate) of formB you pick up this
value and set whatever you want?
Quote:

>I have a frmClients bounded to a tblClients (access) and a frmProducts
>(which is related to tlbClients as "one to many" by the noclient field).

>I want to open the form frmProducts using the noclient as a parameter.

>The result should be that when the user click the cmdButton to open the
>frmProducts, it displays the products of the client which appears in the
>frmClients.

>Thanks for help.



Tue, 23 Apr 2002 03:00:00 GMT  
 Opening a form with parameters using Data Connection
Create a Public variable (or a hidden label or text box) on the frmProducts
to hold the noclient value.  Then in the cmdButton_Click event load
frmProducts and set the value of the noclient variable before showing
frmProducts.

Load frmProducts
frmProducts.Client = noclient
frmProducts.Show

Hope this helps


Quote:
> I have a frmClients bounded to a tblClients (access) and a frmProducts
> (which is related to tlbClients as "one to many" by the noclient field).

> I want to open the form frmProducts using the noclient as a parameter.

> The result should be that when the user click the cmdButton to open the
> frmProducts, it displays the products of the client which appears in the
> frmClients.

> Thanks for help.



Tue, 23 Apr 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. using parameter query to open a form

2. Opening databases without using Forms and placing the data control objects on them

3. Passing Parameters to stored parameter queries using VB 5's Data Controls

4. Using data to specify forms/functions to open/call

5. Opening databases without using Forms and placing the data control objects on them

6. Forms Collection: Using it to Open Forms by Passing the Form Name as a String Variable

7. Open form, close form, open form = disposed object exception

8. Open a form and use multiple data from another (variable)form

9. Open a form and use multiple data from another (variable)form

10. Using ADO Connection parameters as variable?

11. opening a form using a string containing form name

12. Open connections to the data base.

 

 
Powered by phpBB® Forum Software