Laurie V
asked on
VBA On Load User Type Not Defined error
Option Compare Database
Dim RS As ADODB.Recordset
Private Sub Form_Load()
Dim RS As ADODB.Recordset
Set RS = New ADODB.Recordset
RS.Open Me.RecordSource, CurrentProject.Connection, adOpenStatic, adLockOptimistic
If RS.RecordCount = 0 Then
MsgBox "There are no existing records to edit! Please go to the add form to create some!"
DoCmd.Close
End If
RS.Close
End Sub
I get error messgae user defined type not defined?
Dim RS As ADODB.Recordset
Private Sub Form_Load()
Dim RS As ADODB.Recordset
Set RS = New ADODB.Recordset
RS.Open Me.RecordSource, CurrentProject.Connection,
If RS.RecordCount = 0 Then
MsgBox "There are no existing records to edit! Please go to the add form to create some!"
DoCmd.Close
End If
RS.Close
End Sub
I get error messgae user defined type not defined?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER