T
Tony Williams
I have a search form that is in continuos forms format. I select a record and
click on a command button to open another form showing the data that I've
picked.At least that's what should happen. However when I click on the button
I get a message that says " You cancelled the previous transaction" Can
anyone help me with this code?
Private Sub cmdopenrecord_Click()
On Error GoTo Err_cmdopenrecord_Click
Dim strsemitarefnbr As String
'set strSEMITAREFNbr equal to the selected value before closing the
form, otherwise it will give us an error
strsemitarefnbr = Me.SEMITAREFNbr.Value
Forms!frmMain!SubForm1.SourceObject = "semitavehicle"
Forms!frmMain!SubForm1.Form.RecordSource = "SELECT * FROM [semita] WHERE
[SEMITAREFNbr] = '" & strsemitarefnbr & "'"
Exit_cmdopenrecord_Click:
Exit Sub
Err_cmdopenrecord_Click:
MsgBox Err.Description
Resume Exit_cmdopenrecord_Click
End Sub
Thank you
Tony
click on a command button to open another form showing the data that I've
picked.At least that's what should happen. However when I click on the button
I get a message that says " You cancelled the previous transaction" Can
anyone help me with this code?
Private Sub cmdopenrecord_Click()
On Error GoTo Err_cmdopenrecord_Click
Dim strsemitarefnbr As String
'set strSEMITAREFNbr equal to the selected value before closing the
form, otherwise it will give us an error
strsemitarefnbr = Me.SEMITAREFNbr.Value
Forms!frmMain!SubForm1.SourceObject = "semitavehicle"
Forms!frmMain!SubForm1.Form.RecordSource = "SELECT * FROM [semita] WHERE
[SEMITAREFNbr] = '" & strsemitarefnbr & "'"
Exit_cmdopenrecord_Click:
Exit Sub
Err_cmdopenrecord_Click:
MsgBox Err.Description
Resume Exit_cmdopenrecord_Click
End Sub
Thank you
Tony