I was able to figure out the following code, and it works:
I thought that I would be able to replace lines 4 & 5 with the following:
but it said that sfrmAppraisals wasn't open on the error messages. So I thought that I would try
Same Problem. Is there a way to do this?
It is really no big deal, but I thought it would be a little more efficient using only one line of code instead of two. The form opens on the slow side anyway so I'm trying to eliminate any unnecessary steps in the code.
Code:
Private Sub Command4_Click() DoCmd.OpenForm "frmLoans" DoCmd.SearchForRecord , , acFirst, "LoanID = " & Me.txtLoanID Forms!frmLoans!sfrmAppraisals.SetFocus DoCmd.SearchForRecord , , acFirst, "AppraisalID = " & Forms!frmSearch!txtAppraisalID End Sub
Code:
DoCmd.SearchForRecord acDataForm, "sfrmAppraisals", acFirst, "AppraisalsID = " & Me.txtAppraisalID
Code:
DoCmd.SearchForRecord acDataForm, "frmLoans!sfrmAppraisals.Form", acFirst, "AppraisalsID = " & Me.txtAppraisalID
It is really no big deal, but I thought it would be a little more efficient using only one line of code instead of two. The form opens on the slow side anyway so I'm trying to eliminate any unnecessary steps in the code.
Comment