G
Guest
Hi, I have (below) some code that opens a form(FrmRecUpdate) based on the
selected PatientNo in another form called FrmClinic1sub.
'DoCmd.OpenForm "FrmRecUpdate", , , "[PatientNo] =
Forms![FrmClinic1Sub]![PatientNo]"
This works fine when the form FrmClinic1Sub is opened as a standalone form.
However it needs to open as a Subform, contained within a form called
FrmClinic1. When I amend the code to account for the fact that FrmClinic1Sub
is now a subform, it fails. My new code is partly derived from the help
screen, and from the original code, suggested by Rowiga
DoCmd.OpenForm "FrmRecUpdate", , , "PatientNo =
Forms!FrmClinic1.FrmClinic1sub.Form!Controls.PatientNo"
Am I making a mistake, or is this action not possible from a subfrom?
Thank you, Tim
selected PatientNo in another form called FrmClinic1sub.
'DoCmd.OpenForm "FrmRecUpdate", , , "[PatientNo] =
Forms![FrmClinic1Sub]![PatientNo]"
This works fine when the form FrmClinic1Sub is opened as a standalone form.
However it needs to open as a Subform, contained within a form called
FrmClinic1. When I amend the code to account for the fact that FrmClinic1Sub
is now a subform, it fails. My new code is partly derived from the help
screen, and from the original code, suggested by Rowiga
DoCmd.OpenForm "FrmRecUpdate", , , "PatientNo =
Forms!FrmClinic1.FrmClinic1sub.Form!Controls.PatientNo"
Am I making a mistake, or is this action not possible from a subfrom?
Thank you, Tim