Hi
Everyone i am trying to filter the records based on cboPlateNo but unable to succeed, after update of combo box that row records which is on form should filled up with information related to that row.
below is my full code on frmVehicles.
when i click the cboPlateNo button on form it is giving me following errors in afterupdate event of cboPlateno.
1. runtime error 3070'
The microsoft access database engine does not recognize 'BMP' as a valid field name or expression.
2. when i add '" syntax error in string in expression.
my tblvehicles PK is PlateNo (Text) field entry example BMP-501248
Everyone i am trying to filter the records based on cboPlateNo but unable to succeed, after update of combo box that row records which is on form should filled up with information related to that row.
below is my full code on frmVehicles.
Code:
Option Compare Database
Private Sub BtnSave_Click()
saved = True
DoCmd.RunCommand (acCmdSaveRecord)
Me.btnSave.Enabled = False
saved = False
End Sub
Private Sub cboPlateNo_AfterUpdate()
Me.Recordset.FindFirst "PlateNo = " & Me.cboPlateNo
End Sub
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim Response As Integer
If saved = False Then
Response = MsgBox("Do you want to save the changes on this record?", vbYesNo, "Save Changes?")
If Response = vbNo Then
Me.Undo
End If
Me.btnSave.Enabled = False
End If
End Sub
Private Sub Form_Dirty(Cancel As Integer)
Me.btnSave.Enabled = True
End Sub
when i click the cboPlateNo button on form it is giving me following errors in afterupdate event of cboPlateno.
1. runtime error 3070'
The microsoft access database engine does not recognize 'BMP' as a valid field name or expression.
2. when i add '" syntax error in string in expression.
my tblvehicles PK is PlateNo (Text) field entry example BMP-501248