J
John B
Hi,
I run the following append query from a button in a form.
Unfortunatly this query doesn't populate the Table on the first click.
I need to run the query twice. Is there any reason?
Private Sub InsertOrderDetails_Click()
On Error GoTo Err_Update_Click
If IsNull(Me.txtCalOutput) Then
MsgBox ("Insert Date"), vbInformation, "Attention"
Me.txtCalOutput.SetFocus
End If
Dim OrderDetail As String ' First query
stDettaglioOrdini = "Qry_Order Details_Update"
DoCmd.OpenQuery OrderDetail, acNormal, acEdit
Dim stData As String ' Second query
stData = "Data_Temp"
DoCmd.OpenQuery stData, acNormal, acEdit
MsgBox ("Insert Completed."), vbOKOnly,
"Table Oder Details"
Exit_Update_Click:
Exit Sub
Err_Update_Click:
MsgBox Err.Description
Resume Exit_Update_Click
End Sub
I run the following append query from a button in a form.
Unfortunatly this query doesn't populate the Table on the first click.
I need to run the query twice. Is there any reason?
Private Sub InsertOrderDetails_Click()
On Error GoTo Err_Update_Click
If IsNull(Me.txtCalOutput) Then
MsgBox ("Insert Date"), vbInformation, "Attention"
Me.txtCalOutput.SetFocus
End If
Dim OrderDetail As String ' First query
stDettaglioOrdini = "Qry_Order Details_Update"
DoCmd.OpenQuery OrderDetail, acNormal, acEdit
Dim stData As String ' Second query
stData = "Data_Temp"
DoCmd.OpenQuery stData, acNormal, acEdit
MsgBox ("Insert Completed."), vbOKOnly,
"Table Oder Details"
Exit_Update_Click:
Exit Sub
Err_Update_Click:
MsgBox Err.Description
Resume Exit_Update_Click
End Sub