Problem w/referencing a Sub-Form via VBA

  • Thread starter Thread starter Anthony Viscomi
  • Start date Start date
A

Anthony Viscomi

I hav the following:

DoCmd.OpenForm "frmPayment", , , , acFormAdd, acDialog
Me![SS] = Forms![dbo_course subform].SS

I want the "frmPayment" to add the "SS" from the subform when it is opened
via a "click" event.

I've also tried this:
Me![SS] = Forms![frmStudent(Main)]![dbo_course subform]!SS

Thanks in advance!
Anthony
 
Anthony said:
I hav the following:

DoCmd.OpenForm "frmPayment", , , , acFormAdd, acDialog
Me![SS] = Forms![dbo_course subform].SS

I want the "frmPayment" to add the "SS" from the subform when it is opened
via a "click" event.

I've also tried this:
Me![SS] = Forms![frmStudent(Main)]![dbo_course subform]!SS

The general reference syntax for subform controls is this:

forms!yourformname!yoursubformCONTROLname.Form.yourcontrolnameinthesubform
 
Back
Top