I have a DATASHEET Subform linked to a Query of a table I am making changes to. The Query takes data from the Table and embelishes the data based on the table content.
If I add, edit or delete a record I need to requery the Datasheet Subform on the main form.
Main form holds both the call to the Table Update Forms and the SubForm ... the issue is that after VBA returns from frmTable*, it doesn't appear to do the requery ... yet if I do left and right arrows it works fine
Code:If strFnc = "Add" Then DoCmd.OpenForm ("frmTableAdd") Me.frmMyQuerySubForm.Form.Requery ElseIf strFnc = "Edit" Then DoCmd.OpenForm ("frmTableEdit") Me.frmMyQuerySubForm.Form.Requery ElseIf strFnc = "Del" Then DoCmd.OpenForm ("frmTableDelete") Me.frmMyQuerySubForm.Form.Requery ElseIf strFnc = "LeftArrow" Then ginMonth = ginMonth - 1 If ginMonth <= 0 Then ginMonth = 12 ginYear = ginYear - 1 End If Me.frmItemQuery.Form.Requery ElseIf strFnc = "RightArrow" Then ginMonth = ginMonth + 1 If ginMonth >= 13 Then ginMonth = 1 ginYear = ginYear + 1 End If Me.frmItemQuery.Form.Requery EndIf