Get Values From Continuous Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey all

I've got a continuous forms subform with a few unbound controls on it. When I try to refer to the controls on this subform from the main form - Me.frmSubFormName!TextBoxName - I always get the value from the first record displayed. I know that the subform doesn't *really* have multiple instances of each control, but I've got to think there is a way to jump Access's "attention" to the next record down on that continuous form.

I tried something like DoCmd.GoToRecord , ,frmSubFormName, acNext - but I get an error saying "The form frmSubFormName Is Not Open."

Any thoughts?
 
You could set the focus to the sub form and then use the active object to
move:

' Set focus to sub form
Forms!MainFormName!SubFormControlName.SetFocus
' Move to nect record in active object
DoCmd.GoToRecord acActiveDataObject, , acNext

I havn't tried it but it should be ok.

HTH,

Neil.

MDW said:
Hey all,

I've got a continuous forms subform with a few unbound controls on it.
When I try to refer to the controls on this subform from the main form -
Me.frmSubFormName!TextBoxName - I always get the value from the first record
displayed. I know that the subform doesn't *really* have multiple instances
of each control, but I've got to think there is a way to jump Access's
"attention" to the next record down on that continuous form.
I tried something like DoCmd.GoToRecord , ,frmSubFormName, acNext - but I
get an error saying "The form frmSubFormName Is Not Open."
 
Back
Top