RE: can't dim db as database
From: Eric Butts [MSFT] (ebutts_at_online.microsoft.com)
Date: 03/14/04
- Next message: Eric Butts [MSFT]: "RE: Access 97 runtime on XP"
- Previous message: Eric Butts [MSFT]: "RE: Upgrade causing problem"
- In reply to: hanssoderstrom_at_yahoo.com: "can't dim db as database"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 14 Mar 2004 23:25:24 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>
| Sender: <hanssoderstrom@yahoo.com>
| Subject: can't dim db as database
| Date: Sun, 14 Mar 2004 14:02:35 -0800
| Lines: 14
| Message-ID: <d1d601c40a10$0eb76130$a101280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcQKEA631vlX0XA3RBChbJYn0iAIaQ==
| Newsgroups: microsoft.public.access.setupconfig
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.setupconfig:29439
| NNTP-Posting-Host: tk2msftngxa09.phx.gbl 10.40.1.161
| X-Tomcat-NG: microsoft.public.access.setupconfig
|
| 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
|
- Next message: Eric Butts [MSFT]: "RE: Access 97 runtime on XP"
- Previous message: Eric Butts [MSFT]: "RE: Upgrade causing problem"
- In reply to: hanssoderstrom_at_yahoo.com: "can't dim db as database"
- Messages sorted by: [ date ] [ thread ]