T
Tony Williams
I have a search form (in Continuos format) with limited fields that when the
user selects a record from it and presses a command button a form is opened
that shows the whole record. However when this form opens it isn't editable.
I've change the Data property to inconsistent updates but I still can't edit
the form. Here is my code to open the form:
Private Sub cmdopenrecord_Click()
On Error GoTo Err_cmdopenrecord_Click
Dim strVRM As String
'set strVRM equal to the selected value before closing the form,
otherwise it will give us an error
strVRM = Me.VRM.Value
Forms!frmMain!SubForm1.SourceObject = "frmVehicle"
Forms!frmMain!SubForm1.Form.RecordSource = "SELECT * FROM [qryvehicle]
WHERE [txtVRM] = '" & strVRM & "'"
Exit_cmdopenrecord_Click:
Exit Sub
Err_cmdopenrecord_Click:
MsgBox Err.Description
Resume Exit_cmdopenrecord_Click
End Sub
Can someone help with making this code open an editable version of the form
frm.vehicle which is a subform of frm.main.
many thanks
Tony
user selects a record from it and presses a command button a form is opened
that shows the whole record. However when this form opens it isn't editable.
I've change the Data property to inconsistent updates but I still can't edit
the form. Here is my code to open the form:
Private Sub cmdopenrecord_Click()
On Error GoTo Err_cmdopenrecord_Click
Dim strVRM As String
'set strVRM equal to the selected value before closing the form,
otherwise it will give us an error
strVRM = Me.VRM.Value
Forms!frmMain!SubForm1.SourceObject = "frmVehicle"
Forms!frmMain!SubForm1.Form.RecordSource = "SELECT * FROM [qryvehicle]
WHERE [txtVRM] = '" & strVRM & "'"
Exit_cmdopenrecord_Click:
Exit Sub
Err_cmdopenrecord_Click:
MsgBox Err.Description
Resume Exit_cmdopenrecord_Click
End Sub
Can someone help with making this code open an editable version of the form
frm.vehicle which is a subform of frm.main.
many thanks
Tony