borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2009 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (ActiveX)Next Topic (mdiform + activex) New Topic New Poll Post Reply
AndreaVB Forum : ActiveX : I try to use the MSHFlexGrid in Access
Poster Message
isc_max
Level: Trainee

Registered: 13-07-2005
Posts: 3

icon I try to use the MSHFlexGrid in Access

Well, its a similar code that I use:

Dim rs As adODB.Recordset
Dim con As adODB.Connection

Set rs = New adODB.Recordset
Set con = New adODB.Connection
con.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data source=d:\Clasificacion NA.mdb")

rs.Open "select * from universo1", con, adOpenDynamic

MSHFlexGrid3.ControlSource = rs

Well I try to show the query in the gridin a form of Access XP, but I get in the Control Source: Type mistmatch (sorry my bad english I get VS in spanish)

I check the Forum and check the component Microsoft ADO Data Control 6.0

May be it's a small error, but I'm begginer.

13-07-2005 at 07:52 PM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: I try to use the MSHFlexGrid in Access

Access shouldnt be much different than VB, so let me try to help....

Reference to Microsoft ADO Data Control 6.0:

You dont need any since you are using ADO recordset and connection objects, so you need a reference to Microsoft ActiveX Data Objects 2.x

____________________________
If you find the answer helpful, please mark this topic as solved.

14-07-2005 at 03:37 PM
View Profile Send Email to User Show All Posts | Quote Reply
isc_max
Level: Trainee

Registered: 13-07-2005
Posts: 3
icon Re: I try to use the MSHFlexGrid in Access

Yes Goran, in the references is this reference, the 2.5

Im sorry! isn't ADO the other reference, is Microsoft DAO 3.6 Object library.

And the problem persist... Type mistmach...

14-07-2005 at 04:26 PM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: I try to use the MSHFlexGrid in Access

Try

Set MSHFlexGrid3.ControlSource = rs


____________________________
If you find the answer helpful, please mark this topic as solved.

14-07-2005 at 09:10 PM
View Profile Send Email to User Show All Posts | Quote Reply
isc_max
Level: Trainee

Registered: 13-07-2005
Posts: 3
icon Re: I try to use the MSHFlexGrid in Access

No Goran. Isn't work...

Well I leave this for the moment. And I have only a cuestion, in somes sites I see that the properties of this control is different that in Acces, not remember but is something like row source.

Anyway, thanks by your help!

19-07-2005 at 04:17 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : ActiveX : I try to use the MSHFlexGrid in Access
Previous Topic (ActiveX)Next Topic (mdiform + activex) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2009 Andrea Tincaniborder