I have "frmVendor" which has a subform on it "frmVendorAssignment_qry_subform". Within the "frmVendorAssignment_qry_subform", I have a hyperlink on a person's name. When that hyperlink is clicked, it opens up "frmProfile" (that persons profile).
On "frmProfile", I have cmdClose (Visible = No). I only need that button visible when "frmProfile" opens from the Vendor subform.
The code I have on the hyperlink is:
DoCmd.OpenForm "frmProfile", , , "[person_key] = " & person_key, , acDialog
Forms!frmProfile.cmdClose.Visible = True
It does open frmProfile to that person's profile, however, when I force a close on "frmProfile", I get the error message:
Run-time error '2450': 'DatabaseName" can't find the form "frmProfile" referred to in a macro expression or Visual Basic Code.
Thanks in advance.