Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Setup / Configuration / March 2004

Tip: Looking for answers? Try searching our database.

can't dim db as database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
- 14 Mar 2004 23:02 GMT
Hello!
In many of the examples the dim statement with
database and table are used as this for example:
Dim db As Database, Tbl as Table

When I try this I get a compile error saying "User-
defined type not defined.

This is stopping me from doing any of the thing I lkke to
so I hope there is someone to help me with this as I
assume simple problem

Thanks in advance
Hans
Eric Butts [MSFT] - 15 Mar 2004 00:25 GMT
Hi Hans,

Check your library references:
- within your VBA code window select the menu option Tools > References
- make sure Microsoft DAO 3.6 Object Library is checked and it's priority
is moved as high as possible (3rd item from the top)

I think you meant to write
                      "Tbl as TableDef" instead of "Tbl as Table"

Note: You don't necessarily need to move the library reference as high as
possible if you write your code as follows

           Dim db As DAO.Database, Tbl as DAO.TableDef

For details on your issue see:
How Office Access 2003 Resolves Visual Basic for Applications References
http://support.microsoft.com/default.aspx?scid=kb;en-us;824255

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

Regards,

Eric Butts
Microsoft Access Support
ebutts@online.microsoft.com
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?  If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch.  Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights

--------------------
| Content-Class: urn:content-classes:message
| From: <hanssoderstrom@yahoo.com>
[quoted text clipped - 30 lines]
| Thanks in advance
| Hans
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.