|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
DAODB problems in Access
I am attempting to access a database while coding in VBA in Access. My declarations are,
Dim sDatabase As String Dim daoDB As Database Dim daoRS As Recordset The actual code that I'm using is, Private Sub cmdOpen_Click() Dim fField As Field sDatabase = "C:\Documentation\HL7\Bedtracking Transactions Maker.mdb" Set daoDB = OpenDatabase(sDatabase) Set daoRS = daoDB.OpenRecordset("SELECT * FROM Transactions") daoRS.MoveFirst While Not daoRS.EOF 'Some Function MsgBox daoRS.Fields(0).Value MsgBox daoRS.Fields(1).Value MsgBox daoRS.Fields(2).Value MsgBox daoRS.Fields(3).Value MsgBox daoRS.Fields(4).Value MsgBox daoRS.Fields(5).Value MsgBox daoRS.Fields(6).Value MsgBox daoRS.Fields(7).Value MsgBox daoRS.Fields(8).Value MsgBox daoRS.Fields(9).Value MsgBox daoRS.Fields(10).Value MsgBox daoRS.Fields(11).Value daoRS.MoveNext Wend End Sub Is there any reason that this should not work? The error that I am getting is definitely from the declaration. If i remove the declarations, the application runs ok. The error makes me unable to run any aspect of the form that i'm creating. Any help would be greatly appreciated since I'm a VB noob. |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > DAODB problems in Access |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|