paulmcdonnell
Ready to Help
- Local time
- Today, 12:29
- Joined
- Apr 11, 2001
- Messages
- 167
Hi guys,
I have code which I use to update a set of records. The code used to work fine previously but now I'm getting "Compile error, Automation error" and my DIM dbs As Database statement highlighted by the de-bugger. Do i have a referencing probelem or is it something else. the code has worked fine before.
EG of Code:
Dim dbs As Database
Dim rst As Recordset
Dim retvalue As String
' collect seletion
Me.FilterOn = False
'check validity
' make changes
On Error Resume Next
retvalue = MsgBox("Make changes to fields", vbOKCancel + vbQuestion)
If retvalue = vbOK Then GoTo change Else End
change:
DoCmd.OpenForm ("Form-processing")
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset(rsource)
rst.MoveFirst
Cheers
Paul
I have code which I use to update a set of records. The code used to work fine previously but now I'm getting "Compile error, Automation error" and my DIM dbs As Database statement highlighted by the de-bugger. Do i have a referencing probelem or is it something else. the code has worked fine before.
EG of Code:
Dim dbs As Database
Dim rst As Recordset
Dim retvalue As String
' collect seletion
Me.FilterOn = False
'check validity
' make changes
On Error Resume Next
retvalue = MsgBox("Make changes to fields", vbOKCancel + vbQuestion)
If retvalue = vbOK Then GoTo change Else End
change:
DoCmd.OpenForm ("Form-processing")
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset(rsource)
rst.MoveFirst
Cheers
Paul