D.Stamp
12-21-2002, 11:46 AM
I am a new user so I apologize in advance if I don't follow the correct protocol for posting questions....
When executing an Access 2000 module that is copied from an ACCESS 97 application I error with the following Microsoft Visual Basic message: "User-defined type not defined" on the 'Dim DB As Database' and 'Dim QD As QueryDef' lines. Since all the Help examples reference the DAO objects, it appears that DAO is still valid and somehow the DAO component is missing on my machine. Interestingly enough, when I open an application using Access 97, I can reference the DAO objects. Any ideas on how to reactivate DAO in Access 2000? Is this something I needed to define when I installed Office 2000 Professional on my machine? (Reactivatng DAO would the easiest solution for me as it would allow the existing application to interact smoothly with the new application I am coding)
Alternatively, using ADO instead of DAO, I have been trying to code a query with parameters. I have successfully executed the query (using 'Set rsPO = cmdrsPO.Execute') but am unable to change data on the record retrieved. I get a Microsoft Access error "opened but in read-only mode". I think this is because my CurrentProject.Connection provider is Microsoft.Jet.OLEDB.4.0 and the default data access is Read-Only. (I found this tidbit is the Recordset Property help screen) Any idea on how to code a query using parameters so that I can update some of the fields on the retrieved record? (note: my parameters are variables not fixed values)
When executing an Access 2000 module that is copied from an ACCESS 97 application I error with the following Microsoft Visual Basic message: "User-defined type not defined" on the 'Dim DB As Database' and 'Dim QD As QueryDef' lines. Since all the Help examples reference the DAO objects, it appears that DAO is still valid and somehow the DAO component is missing on my machine. Interestingly enough, when I open an application using Access 97, I can reference the DAO objects. Any ideas on how to reactivate DAO in Access 2000? Is this something I needed to define when I installed Office 2000 Professional on my machine? (Reactivatng DAO would the easiest solution for me as it would allow the existing application to interact smoothly with the new application I am coding)
Alternatively, using ADO instead of DAO, I have been trying to code a query with parameters. I have successfully executed the query (using 'Set rsPO = cmdrsPO.Execute') but am unable to change data on the record retrieved. I get a Microsoft Access error "opened but in read-only mode". I think this is because my CurrentProject.Connection provider is Microsoft.Jet.OLEDB.4.0 and the default data access is Read-Only. (I found this tidbit is the Recordset Property help screen) Any idea on how to code a query using parameters so that I can update some of the fields on the retrieved record? (note: my parameters are variables not fixed values)