Sub form access

  • Thread starter Thread starter NATH
  • Start date Start date
N

NATH

Hi

I need to have a sql statement on a comobobox contained
within a sub form. On the parent form the selection of a
combobox governs what SQL to use. Can you advise on how
to set the recordsource of a combobox in a sub form,
whilst selecting in the parent form.

TIA

Nathan.
 
Hi,


The rowsource property is about the list, not the recordsource (that
last one exists for forms, not for combo/list box).

Me.ComboBoxName.RowSource="SELECT ... WHERE ...
=Forms!FormName!ControlName ... "

You can take a look at http://www.mvps.org/access/forms/frm0031.htm to get
the syntax FORMS!... accordingly to where you are and what you can try to
access. Since, in this case, you try to reach a control on a "main" form,
the simple syntax FORMS!FormName!ControlName is enough to reach the value.



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top