Making Components Visible to Multiple Forms 
Author Message
 Making Components Visible to Multiple Forms

Hello,

I got a ADO component in Form1.  I would like to link some entry boxes
in Form2(no, I don't really name my forms these names) to that ADO
component in Form1.  Is it possible to make that ADO component visible
to Form2.

Suposedly, you can use the keword "Public", but I just end up with
errors all over the place.

What I also tried(I put this in the load function of Form2, but it did
not work):
Text1.DataSource = Form1.Adodc1
Text1.DataField = <fieldname>

Yes, Text1 is an entry box in Form2

Thank you,
Bhu46



Thu, 11 Sep 2003 13:36:49 GMT  
 Making Components Visible to Multiple Forms
i really can't guarantee this will work.  i did something like this years
ago and i don't really remember what i did.  i could be dead wrong.

Quote:
> Suposedly, you can use the keword "Public", but I just end up with
> errors all over the place.

yeah it thought that would work.  did you use public like so.

in your basGlobal, declare Form1 as frm1.  you might have to play with the
syntax.  like i said i'm going off the top of my head.
 ?Global or Public? frm1 as ?new? Form1

when you want to make FORM1 visibile, instead use frm1.show
then try to access the frm1.ADODC properties.

hope this helps,
please let me know if and what worked for you.

allen


Quote:
> Hello,

> I got a ADO component in Form1.  I would like to link some entry boxes
> in Form2(no, I don't really name my forms these names) to that ADO
> component in Form1.  Is it possible to make that ADO component visible
> to Form2.

> Suposedly, you can use the keword "Public", but I just end up with
> errors all over the place.

> What I also tried(I put this in the load function of Form2, but it did
> not work):
> Text1.DataSource = Form1.Adodc1
> Text1.DataField = <fieldname>

> Yes, Text1 is an entry box in Form2

> Thank you,
> Bhu46



Thu, 11 Sep 2003 19:53:46 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. visible=true/Form.Show makes Form.Location change!

2. Making a user defined text box visible in a custom form

3. Form flashing momentarily before opacity makes it visible

4. Making an ActiveX component form a child

5. App is not visible in alt-tab list unless form is visible in the taskbar

6. Making Word Visible

7. Making diagram values visible

8. Making pivot table "(blank)" items visible

9. Making animated chart visible

10. Making Outlook visible when launched from VB

11. Making Check Boxes More VISIBLE

12. Making an object visible and docking it

 

 
Powered by phpBB® Forum Software