Morning all
I have the following code which works well on a command click on a form for running a query, closing the current open form and opening another.
What I want to squeeze in, is to copy the number which has been updated by the query and use that as a new record in the newly opened table... any thoughts.... thanks...
Private Sub Command36_Click()
On Error GoTo Err_Query_update_for_part_number_Click
Dim stDocName As String
stDocName = "Part number generation update"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Query_update_for_part_number_Click:
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "Cat data entry"
Exit Sub
Err_Query_update_for_part_number_Click:
MsgBox Err.Description
Resume Exit_Query_update_for_part_number_Click
End Sub