When i run my program and try to open a form I get this error ( Object doesn't support this property or method). I have tried all i can to locate where but it doesnt show me where but these are the codes that are used when it opens that particular form.
and these are the declarations of the variables
Code:
Private Sub Form_Load()
Vform = 1
Me.Height = 7800
Me.Width = 11565
OpenDB
BindControls
MDIVehicleTracker.MnuClose.Enabled = True
MDIVehicleTracker.MnuSave.Enabled = True
MDIVehicleTracker.MnuDelete.Enabled = True
MDIVehicleTracker.MnuExSheet.Enabled = True
MDIVehicleTracker.MnuWrdSheet.Enabled = True
Set NewWs = DBEngine.CreateWorkspace("dbtemp", "admin", "")
Set NewDb = NewWs.OpenDatabase(App.Path & "\VEHICLE_TRACKER.mdb")
End Sub
Private Sub OpenDB()
DVehType.DatabaseName = App.Path & "\VEHICLE_TRACKER.mdb"
DVehType.RecordSource = "VEH_TYPE"
DVehType.Refresh
End Sub
Private Sub BindControls()
On Error GoTo ErrorHandler
DBCVehType.ListField = "VEHICLE_TYPE"
DVehType.Visible = False
ErrorHandler:
If Err.Number = 3021 Then
MsgBox "There is no available record in the database", vbInformation
End If
End Sub
Code:
Public NewDb As Database Public NewWs As Workspace Public VehType As String Public Vform As Integer
Comment