Data Control and Procedur 
Author Message
 Data Control and Procedur

ON>  Hello,
ON>      I use the standard version of VB. I declared a control Data in
ON>form1.  The data that I read in Form1, would be used in the entire
ON>application, so my  question is whether there is a way that I can
ON>declare the data as a global  variable or pass the data to other
ON>forms,and how do I do it?

Standard version of VB? Pity.. it gets harder. You'll need to create
global variables to hold the values you're using from the data control
and use it as a storage place when going between forms.

Alex.

---
* CMPQwk 1.42-20 #1960 * Earth is 98% full..please delete anyone you can.



Thu, 14 Aug 1997 02:29:00 GMT  
 Data Control and Procedur

Quote:
>ON>  Hello,
>ON>      I use the standard version of VB. I declared a control Data in
>ON>form1.  The data that I read in Form1, would be used in the entire
>ON>application, so my  question is whether there is a way that I can
>ON>declare the data as a global  variable or pass the data to other
>ON>forms,and how do I do it?
>Standard version of VB? Pity.. it gets harder. You'll need to create
>global variables to hold the values you're using from the data control
>and use it as a storage place when going between forms.

Not necessarily. Another form can refer back to your data control by prepending
the form name to the data control name, e.g.

        frmThingy.dtaFoo.Recordset("AnyOldField")

There are a couple of tricks for passing parameters to a form without resorting
to gloabl veriables. One is to create hidden (i.e. Visible property set to False)
labels or textboxes to hold the parameters. Another is to use the Tag property in
your controls to hold parameters. There is more on these techniques in the FAQ.

Cheers

Paul

--

Only one creature could have duplicated the expressions on their faces, and
that would be a pigeon who has heard not only that Lord Nelson has got down
off his column but has also been seen buying a 12-bore repeater and a box
of cartridges.
       -- (Terry Pratchett, Mort)



Fri, 22 Aug 1997 20:22:06 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. procedur od telnet

2. Using ADO Data Control on User Control as Data Source

3. Data Control vs Remote Data Control (for Axx95 and VB4/32 Enterprise)

4. Data controls or no data controls?

5. Data control: Where is my Data control ?

6. data control and remote data control

7. data control and remote data control

8. Create User Control as Data Source Using ADO Data Control

9. Data-bound Masked Edit makes all data-bound controls not display data

10. formatting rows and columns in unbound data control, rich text box control, or listbox control

11. dbcombo and data combo control data/row source

12. Display data on DBGrid without needing Data Control?

 

 
Powered by phpBB® Forum Software