Good Afternoon,
I have two forms, frmMain and frmAddChange. On my frmMain there is a button cmdOpenAddForm that when clicks opens the frmAddRecord
I would like to "hide" the main form when the subform is displayed that is number one.
Number two, when the subform is closed, I want to have frmMain recieve focus and requery the results. How do i do this?? I saw many posts on how to set focus to a field, but not back and forth between forms.
Thanks,
I have two forms, frmMain and frmAddChange. On my frmMain there is a button cmdOpenAddForm that when clicks opens the frmAddRecord
Code:
Private Sub cmdOpenAddForm_Click()
On Error GoTo Err_cmdOpenAddForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAddRecord"
'sbfMySubform.SetFocus
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenAddForm_Click:
Exit Sub
Err_cmdOpenAddForm_Click:
MsgBox Err.Description
Resume Exit_cmdOpenAddForm_Click
End Sub
Number two, when the subform is closed, I want to have frmMain recieve focus and requery the results. How do i do this?? I saw many posts on how to set focus to a field, but not back and forth between forms.
Thanks,