Database object ?

M

Mitch

Hi there,
I'm trying to write some code that will loop through the
value of a field in table and display the value in a
msgbox, however Access 2002 does'nt recognise the
database object. My code is as follows...

Dim dbsBillingReports As Database
Dim rstData As Recordset
Dim strDisplay As String

Set dbsBillingReports = OpenDatabase("BillingReports.mdb")
Set rstData = dbsBillingReports.openrecordset
("detailjune2004", )

but when I try to compile this I get "User defined type
not defined" am I coding this incorrectly ? If so what is
the correct syntax.

Regards,
Mitch....
 
A

Amy Vargo

Hi,

My name is Amy Vargo. Thank you for using the Microsoft Access Newsgroups.

Check your references. Create a new module. This will open the VBA Editor
window. Go to Tools, References. Check the Microsoft DAO 3.6 Object
Library and place it in the list anywhere above the reference for the
ActiveX 2.1 Library so that it takes precedence. Click ok, then close and
save the module.

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Amy Vargo
Microsoft Access Engineer


This posting is provided 'AS IS' with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top