howto: use 1 data access with 2 forms 
Author Message
 howto: use 1 data access with 2 forms

hi

i am trying to have 2 forms using the same data access but i don't know how
can anyone help

--
henrik



Sat, 23 Oct 2004 17:05:26 GMT  
 howto: use 1 data access with 2 forms

Quote:
> hi

> i am trying to have 2 forms using the same data access but i don't know
how
> can anyone help

> --
> henrik

Put a data control on Form1. Refer to that data control in From2 as
Form1.DataControl


Sun, 24 Oct 2004 05:08:18 GMT  
 howto: use 1 data access with 2 forms

Quote:

> hi

> i am trying to have 2 forms using the same data access but i don't know how
> can anyone help

You can define connection to database and recordset in module or as public on form.


Sun, 24 Oct 2004 16:45:37 GMT  
 howto: use 1 data access with 2 forms
hi David

i am not all that good jet . do you have a code snip to show how to do in a
module

best regards
Henrik



Sun, 24 Oct 2004 20:23:19 GMT  
 howto: use 1 data access with 2 forms

If you simply want to have the same connection and open a new recordset for
each form then Just create a Module and define the Connection as global ...
In Module:    Public MyConnection As ADODB.Connection

Then in each form you can define a Recordset..
In Form1:     Dim MyRecordset1 As ADODB.Recordset
In Form2:     Dim MyRecordset2 As ADODB.Recordset

OR If you want to access both the connection and the 1 recordset results
from both forms, define both recordset and connection as Public;
In Module:   Public MyConnection As ADODB.Connection
                    Public MyRecordset As ADODB.Recordset

Cheers
Lore

Quote:

> hi David

> i am not all that good jet . do you have a code snip to show how to do in a
> module

> best regards
> Henrik



Thu, 04 Nov 2004 08:28:54 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Using VB5 to import data to access without using the Data control

2. using Excel data for an Access form

3. Using forms for writing data in access wtih dial-up networking

4. How to convert Access Form data to a text file using vb

5. VB6 and Access 2000 Problem using Data Form Wizard

6. HOWTO: Restrict access to public properties (or at least its data)

7. Howto Using HTMLHelp in Access Application

8. Howto connect to a password protected access-database by using ADO

9. HOWTO: Retrieve list of MS Access reports using VB

10. HOWTO: Retrieve list of MS Access reports using VB

11. using Scantron-esque forms and using the data from them in VB

12. Grabbing Form data without using the Request.Form() Method

 

 
Powered by phpBB® Forum Software