473,395 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

DAO.Recordset

Mal
I have the following line of code in VB6:

Dim rst As DAO.Recordset

The compiler doesn't like the DAO prefix. Does anyone
know what could be the cause of this.
Nov 20 '05 #1
14 3470
Cor
Hi Mal,
Did you set a reference to DAO?
Cor
Nov 20 '05 #2
* "Mal" <an*******@discussions.microsoft.com> scripsit:
I have the following line of code in VB6:

Dim rst As DAO.Recordset

The compiler doesn't like the DAO prefix. Does anyone
know what could be the cause of this.


This is a VB.NET group. Please turn to this group:

<news://news.microsoft.com/microsoft.public.vb.database.dao>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Cor
Herfried,
<news://news.microsoft.com/microsoft.public.vb.database.dao>

Is that a dotnet group?

Cor
Nov 20 '05 #4
-----Original Message-----
Hi Mal,
Did you set a reference to DAO?
Cor

Thanks for you help Cor. I'm just learning VB. I am
taking this code from a resource book that is explaining
how to create a "dialog box to go to a specific record".
What am I missing to set the reference to DAO? This is the
code they give me:

Private Sub ShowRecord_Click()
'find the selected record, then close the dialog box

Dim rst As DAO.Recordset

'Store the recordset for teh Master Form
Set rst = Forms!Master.RecordsetClone

'Locate the record for the slected account number
rst.Findfirst" "AccountNumber=" " & List0

'Set the form's Bookmark property to move to the record
Forms!Master.Bookmark = rst.Bookmark

'Close the dialog box
DoCmd.Close acForm, "GoToRecordDialog"
End Su
Nov 20 '05 #5
Mal,
Regardless of the right newsgroup ...

In your Project/References from the VB6 menu, you need to add a reference to
"Microsoft DAO 3.6 Object Library" (or 3.51 or 2.5 or whatever is registered
on you PC).

hth,
David Straker
"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Herfried,
<news://news.microsoft.com/microsoft.public.vb.database.dao>

Is that a dotnet group?

Cor

Nov 20 '05 #6
Cor
Hi Mal,

I only know it in VB.net, if you need it in VB6 I thought it was almost the
same.

You open Project, add reference and with VB.net Com, then you search in the
list for the DAO object libary you need and select that..

Cor
Nov 20 '05 #7
Hi Mal,

Some confusion in terminology here. The code sample you are following is VB.
But it's VB written to be used in Microsoft Access (most people call it VBA
just to make it clear). You have to be coding inside a Microsoft Access mdb
to be able to use your code. Microsoft Access automatically creates the
reference to DAO for you. You can't use your code sample from VB 6 without
some modification.

David Straker.

<an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
-----Original Message-----
Hi Mal,
Did you set a reference to DAO?
Cor

Thanks for you help Cor. I'm just learning VB. I am
taking this code from a resource book that is explaining
how to create a "dialog box to go to a specific record".
What am I missing to set the reference to DAO? This is the
code they give me:

Private Sub ShowRecord_Click()
'find the selected record, then close the dialog box

Dim rst As DAO.Recordset

'Store the recordset for teh Master Form
Set rst = Forms!Master.RecordsetClone

'Locate the record for the slected account number
rst.Findfirst" "AccountNumber=" " & List0

'Set the form's Bookmark property to move to the record
Forms!Master.Bookmark = rst.Bookmark

'Close the dialog box
DoCmd.Close acForm, "GoToRecordDialog"
End Su

Nov 20 '05 #8
"Cor" <no*@non.com> schrieb
Herfried,
<news://news.microsoft.com/microsoft.public.vb.database.dao>

Is that a dotnet group?


No
--
Armin

Nov 20 '05 #9
* "Cor" <no*@non.com> scripsit:
I only know it in VB.net, if you need it in VB6 I thought it was almost the
same.

You open Project, add reference and with VB.net Com, then you search in the
list for the DAO object libary you need and select that..


It's pretty similar, but not topic of this group.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #10
* "Cor" <no*@non.com> scripsit:
<news://news.microsoft.com/microsoft.public.vb.database.dao>


Is that a dotnet group?


No, but the OP mentioned VB6 in his post.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #11
Cor
Herfried,
This time you win,
Cor
Nov 20 '05 #12
* "Armin Zingler" <az*******@freenet.de> scripsit:
<news://news.microsoft.com/microsoft.public.vb.database.dao>

Is that a dotnet group?


No


It's a dotnot group.

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #13
* "Cor" <no*@non.com> scripsit:
This time you win,


:-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #14
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb
* "Armin Zingler" <az*******@freenet.de> scripsit:
<news://news.microsoft.com/microsoft.public.vb.database.dao>

Is that a dotnet group?


No


It's a dotnot group.

;-)

Is dort a dotnot oder is det net a dotnet.NET?

;)

--
Armin

Nov 20 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: gary artim | last post by:
Hi All, I have a problem using DBIx::RecordSet. I get correct results but continue to get these messages on stderr. I looked at Compat.pm and it seems to be pointing out a problem with my call...
4
by: Tom | last post by:
I want to open a recordset object on an .asp page. When I open the recordset I would like to use a stored procedure that expects a parameter to be passed for the stored procedure. I will then use...
19
by: Adam Short | last post by:
I am trying to write a routine that will connect a .NET server with a classic ASP server. I know the following code doesn't work! The data is being returned as a dataset, however ASP does not...
0
by: CFW | last post by:
I thought this was going to be easy but I'm missing something . . . I need to open an ADODB recordset using the recordset source for a list box on my for. When my form opens, the list box ADODB...
6
by: lenny | last post by:
Hi, I've been trying to use a Sub or Function in VBA to connect to a database, make a query and return the recordset that results from the query. The connection to the database and the query...
36
by: kjvt | last post by:
Based on a prior posting, I've written a function to convert a recordset to a dataview. The first call to the function for a given recordset works perfectly, but the second call always returns a...
0
ADezii
by: ADezii | last post by:
Most Access Users realize that Recordsets, being virtual representations of a Query, Table, or SQL Statement, exist only in our PC's memory. They, and the data they contain, literally exist at one...
0
ADezii
by: ADezii | last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions may, and should, be: Can I add New Records to the...
6
by: Oko | last post by:
I'm currently developing an MS Access Data Project (.adp) in MS Access 2002. One of the reports within the DB uses data that is Dynamic and cannot be stored on the SQL Server. To resolve this, I...
2
by: wallconor | last post by:
Hi, I am having a problem using Dreamweaver CS3 standard recordset paging behavior. It doesn’t seem to work when I pass parameter values from a FORM on my search page, to the recordset on my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.