![]() | |
#1
| |||
| |||
|
|
We'll need to see your code. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "mr_wizard" <mrreed (AT) cablespeed (DOT) com> wrote in message news:vc2dne8lZNxbnE7cRVn-gA (AT) cablespeedmi (DOT) com... Before I retired, I was a systems analyst with the State of MI. We used Access as several of our databases. I want to use VB5 to write programs that will access my Access databases via ODBC. Every attempt fails at the beginning, where the connection info is Dim'ed, with the error "User-defined type not defined". What am doing wrong? Thanks, Mike Reed |
#2
| |||
| |||
|
|
I can post the code, but let me clarify my previous attempts. I should mention I've had no trouble with VBA programs in the past, with or w/o OBDC. After several frustrating attempts, quite a bit of research, etc. I tried pasting in routines from the VB Help file and from Microsoft's MSDN site. They give the same "User-defined type not defined" error, in the same place in the code (the very beginning), that I recceived with my code. The first few lines of the code (this from MS): Dim wrkODBC As Workspace Set wrkODBC = CreateWorkspace("ODBCWorkspace", "", "", dbUseODBC) 'tried with a UserID also DefaultType = dbUseJet 'tried with and w/o this statement Set wrkJet = CreateWorkspace("", "", "") The error I mentioned refers to the "Dim" statement as the source of the error. Thanks for the reply -- Whatever I'm doing wrong, or not doing, is probably something simple, but I can't put my finger on it..... Mike Reed "Douglas J. Steele" <NOSPAM_djsteele (AT) NOSPAM_canada (DOT) com> wrote in message news:9c2dnRAx290Ijk7cRVn-vA (AT) rogers (DOT) com... We'll need to see your code. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "mr_wizard" <mrreed (AT) cablespeed (DOT) com> wrote in message news:vc2dne8lZNxbnE7cRVn-gA (AT) cablespeedmi (DOT) com... Before I retired, I was a systems analyst with the State of MI. We used Access as several of our databases. I want to use VB5 to write programs that will access my Access databases via ODBC. Every attempt fails at the beginning, where the connection info is Dim'ed, with the error "User-defined type not defined". What am doing wrong? Thanks, Mike Reed |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
I'm not quite sure what you mean when you ask "Do I have DAO selected in the references." As I mentioned, every routine I've pasted in (out of frustration) from the VB Help File and MSDN errors on the very first line of the program. I various DIM statements at the beginning (from the pasted-in code). It errors on the first Dim statement. If I remove it, it errors on the now-new first line, etc., etc. I posted the first few lines in my earlier post. Very frustrating....! Mike |
#5
| |||
| |||
|
|
I'm not quite sure what you mean when you ask "Do I have DAO selected in the references." As I mentioned, every routine I've pasted in (out of frustration) from the VB Help File and MSDN errors on the very first line of the program. I various DIM statements at the beginning (from the pasted-in code). It errors on the first Dim statement. If I remove it, it errors on the now-new first line, etc., etc. I posted the first few lines in my earlier post. Very frustrating....! Mike *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#6
| |||
| |||
|
#7
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |