B
bw
Private Sub SelectRecord_Click()
On Error GoTo Err_SelectRecord_Click
Dim stDocName As String
stDocName = "tblFlightNumberQuery"
Forms![tblAirports]![tblFlightNumber Subform]![FltDate] =
Forms![tblAirports]![TravelDate]
Forms![tblAirports]![tblFlightNumber Subform]![FltLeg] = 1
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenQuery stDocName, acNormal, acEdit 'THIS IS A CREATE TABLE
QUERY
Exit_SelectRecord_Click:
Exit Sub
Err_SelectRecord_Click:
MsgBox Err.Description
Resume Exit_SelectRecord_Click
End Sub
The button for this procedure is on the main form. When I click on the
button, the data is not updated until AFTER the Create Table query is run.
How do I get the selected record in the Subform to be saved/updated before
the Create Table Query is executed?
Thanks,
Bernie
On Error GoTo Err_SelectRecord_Click
Dim stDocName As String
stDocName = "tblFlightNumberQuery"
Forms![tblAirports]![tblFlightNumber Subform]![FltDate] =
Forms![tblAirports]![TravelDate]
Forms![tblAirports]![tblFlightNumber Subform]![FltLeg] = 1
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenQuery stDocName, acNormal, acEdit 'THIS IS A CREATE TABLE
QUERY
Exit_SelectRecord_Click:
Exit Sub
Err_SelectRecord_Click:
MsgBox Err.Description
Resume Exit_SelectRecord_Click
End Sub
The button for this procedure is on the main form. When I click on the
button, the data is not updated until AFTER the Create Table query is run.
How do I get the selected record in the Subform to be saved/updated before
the Create Table Query is executed?
Thanks,
Bernie