If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I "Dim db As Database" using a Access App linked to SQL db
I'm trying to build an unbound MSAccess form to append records to a linked
SQL data table. when I try to set/define the variable using "Dim db As Database" I get type not found error when I compile the code. Any clues for me.......TKS....mw |
#2
|
|||
|
|||
How do I "Dim db As Database" using a Access App linked to SQL db
On Wed, 4 Jan 2006 11:59:01 -0800, "Mike"
wrote: I'm trying to build an unbound MSAccess form to append records to a linked SQL data table. when I try to set/define the variable using "Dim db As Database" I get type not found error when I compile the code. Any clues for me.......TKS....mw In the VBA editor, select Tools... References. Make sure that Microsoft DAO x.xx Object Library (highest version) is checked. With A2000, VBA defaults to selecting the ActiveX Data Objects (ADOX) library instead. John W. Vinson[MVP] |
#3
|
|||
|
|||
How do I "Dim db As Database" using a Access App linked to SQL db
Further to John's answer it would be a good idea to also
disambiguate your Dim statement thus:- Dim db as DAO.Database And any recordsets you declare also using the DAO library:- Dim rst as DAO.Recordset -- Nick Coe (UK) http://www.alphacos.co.uk/ AccHelp + pAnimal http://www.pjandcoe.co.uk/ Online Store http://www.mrcomputersltd.com/ Repairs Upgrades In , Mike typed: I'm trying to build an unbound MSAccess form to append records to a linked SQL data table. when I try to set/define the variable using "Dim db As Database" I get type not found error when I compile the code. Any clues for me.......TKS....mw |
#4
|
|||
|
|||
How do I "Dim db As Database" using a Access App linked to SQL
Thanks, John
It worked, I appreciate the help.............Mike "John Vinson" wrote: On Wed, 4 Jan 2006 11:59:01 -0800, "Mike" wrote: I'm trying to build an unbound MSAccess form to append records to a linked SQL data table. when I try to set/define the variable using "Dim db As Database" I get type not found error when I compile the code. Any clues for me.......TKS....mw In the VBA editor, select Tools... References. Make sure that Microsoft DAO x.xx Object Library (highest version) is checked. With A2000, VBA defaults to selecting the ActiveX Data Objects (ADOX) library instead. John W. Vinson[MVP] |
#5
|
|||
|
|||
How do I "Dim db As Database" using a Access App linked to SQL
Thanks, Nick!
Both of the posts together seems to have cured the ills with it..........Mike "Nick Coe (UK)" wrote: Further to John's answer it would be a good idea to also disambiguate your Dim statement thus:- Dim db as DAO.Database And any recordsets you declare also using the DAO library:- Dim rst as DAO.Recordset -- Nick Coe (UK) http://www.alphacos.co.uk/ AccHelp + pAnimal http://www.pjandcoe.co.uk/ Online Store http://www.mrcomputersltd.com/ Repairs Upgrades In , Mike typed: I'm trying to build an unbound MSAccess form to append records to a linked SQL data table. when I try to set/define the variable using "Dim db As Database" I get type not found error when I compile the code. Any clues for me.......TKS....mw |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Very Slow Access Response | Blaze | General Discussion | 10 | October 11th, 2005 05:15 PM |
Access / SQL 2000 -- ODBC Linked Table Problem | Mike Morgan | General Discussion | 11 | April 6th, 2005 07:31 PM |
Unable to insert record to Access via SQL from an ASP page | Norman Yuan | General Discussion | 1 | February 2nd, 2005 08:23 PM |
Access 2000 -vs- Access 2003? | Mark | General Discussion | 5 | November 30th, 2004 06:36 AM |
Useless Access 2003 | tired, angry, sucidial and bored | General Discussion | 10 | July 21st, 2004 11:52 PM |