need help populating subform

  • Thread starter MES via AccessMonster.com
  • Start date
M

MES via AccessMonster.com

I have a form with a dropdown combo box (EmployeeID) to choose an employee.
I have a subform on that form that lists information from a query of that
employee's activities (queried from an employee activity table). The
parameter on the query for EmployeeID is the field from that form (i.e. -
[Forms]![FormName]![EmployeeID]). So when I choose an employee from the
dropdown list on the form, how do I get the subform to populate with the
queried data for that employee?

Any help would be greatly appreciated. Thanks in advance.
 
K

kingston via AccessMonster.com

ComboBox After Update:
Me.SubForm.Requery
I have a form with a dropdown combo box (EmployeeID) to choose an employee.
I have a subform on that form that lists information from a query of that
employee's activities (queried from an employee activity table). The
parameter on the query for EmployeeID is the field from that form (i.e. -
[Forms]![FormName]![EmployeeID]). So when I choose an employee from the
dropdown list on the form, how do I get the subform to populate with the
queried data for that employee?

Any help would be greatly appreciated. Thanks in advance.
 
M

MES via AccessMonster.com

I apologize, but could you be a little more specific? I am a novice...

I typed in 'Me.Subform.Requery' in the combo box's after update event, and I
get compile error 'Method or data member not found'. I'm assuming I need to
reference my subform name (SubFormActivity) somewhere, but not sure where or
how. Could you let me know the specific language I need to use in my code,
so that when update the field, the subform automatically populates?

Thanks.


ComboBox After Update:
Me.SubForm.Requery
I have a form with a dropdown combo box (EmployeeID) to choose an employee.
I have a subform on that form that lists information from a query of that
[quoted text clipped - 5 lines]
Any help would be greatly appreciated. Thanks in advance.
 
K

kingston via AccessMonster.com

Yes, you need to use the name of the subform control as referenced in the
main form. Go into design mode for the main form and look for the name of
the subform control (click on the subform and look for the name of the
control in the properties toolbar). This may or may not be the same as the
name of the subform itself. Then enter the command:

Me.Your_Subform_Control_Name_Here.Requery

That should be it.
I apologize, but could you be a little more specific? I am a novice...

I typed in 'Me.Subform.Requery' in the combo box's after update event, and I
get compile error 'Method or data member not found'. I'm assuming I need to
reference my subform name (SubFormActivity) somewhere, but not sure where or
how. Could you let me know the specific language I need to use in my code,
so that when update the field, the subform automatically populates?

Thanks.
ComboBox After Update:
Me.SubForm.Requery
[quoted text clipped - 4 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top