how to use VB open two MSaccess tables in one form 
Author Message
 how to use VB open two MSaccess tables in one form

Hello,

This is a Visual FoxPro newsgroup. Please repost your question in a different NG.

--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP7

Quote:

> I am new in VB programming, anybody can help to solve the following problem.

> I want to open two MSaccess tables in VB, but got run time error 91, object variable or with block variable not set

> Private Sub Command1_Click()

> With objQU
> If .State = adStateOpen Then .Close

>     .ActiveConnection = conString
>     .CursorLocation = adUseClient
>     .CursorType = adOpenKeyset
>     .LockType = adLockOptimistic
>     .Source = "select * from QUESTION WHERE remark <> 'slow'"
>     .Open
> End With

>   objQU.MoveFirst
>   retry = 0

> With objMs
> If .State = adStateOpen Then .Close
>     .ActiveConnection = conString
>     .CursorLocation = adUseClient
>     .CursorType = adOpenKeyset
>     .LockType = adLockOptimistic
>     .Source = "select * from name"
>     .Open
> End With

> objMs.MoveFirst
> While Not objMs.EOF
> s_n = objMs.Fields(1)

> ...........


> thank you



Sat, 06 Mar 2004 00:45:39 GMT  
 how to use VB open two MSaccess tables in one form
He has, Eric.  In every single Fox group there is.

--
Fred
Microsoft Visual FoxPro MVP
Please respond only to the newsgroups so that all may benefit.



Quote:
> Hello,

> This is a Visual FoxPro newsgroup. Please repost your question in a
different NG.

> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP7


> > I am new in VB programming, anybody can help to solve the following
problem.

> > I want to open two MSaccess tables in VB, but got run time error 91,

object variable or with block variable not set
Quote:

> > Private Sub Command1_Click()

> > With objQU
> > If .State = adStateOpen Then .Close

> >     .ActiveConnection = conString
> >     .CursorLocation = adUseClient
> >     .CursorType = adOpenKeyset
> >     .LockType = adLockOptimistic
> >     .Source = "select * from QUESTION WHERE remark <> 'slow'"
> >     .Open
> > End With

> >   objQU.MoveFirst
> >   retry = 0

> > With objMs
> > If .State = adStateOpen Then .Close
> >     .ActiveConnection = conString
> >     .CursorLocation = adUseClient
> >     .CursorType = adOpenKeyset
> >     .LockType = adLockOptimistic
> >     .Source = "select * from name"
> >     .Open
> > End With

> > objMs.MoveFirst
> > While Not objMs.EOF
> > s_n = objMs.Fields(1)

> > ...........


> > thank you



Sat, 06 Mar 2004 13:43:36 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. how to use VB open two MSaccess tables in one form

2. one table two forms

3. one table two forms in network

4. One Form to enter data in Two Tables

5. form to drive two tables one to many

6. form to manage a database with two tables one to many

7. one table two forms

8. Two forms using same tables.

9. I'm having trouble using the same table in two forms

10. Why a view can not be created with one table linked to more than two tables

11. Is it one table or two tables?

12. Using one form to update 5 related tables in a remote SQL Server

 

 
Powered by phpBB® Forum Software