Solved

Change subform based on a listbox on main form ACCESS 2003

Posted on 2013-05-10
2
956 Views
Last Modified: 2013-05-10
I have a parent form that displays customers by their Tax ID's.  However, one tax ID can have several names attached to it.  As I change the combo box Tax IS, the listbox with all the names changes to display those that are associated with this Tax id.  This part is fine.  However, there is a sub-form ont his main form that, as the NAME in the list box changes, I want the subform to display teh details for that name.  So, the subform is not really associated with teh TaxID, is is associated with the names (with their Key ID)  in the LIst box.  How can I update the subform based on the NAME key id, not the main  form's Tax ID?

Sandra
0
Comment
Question by:ssmith94015
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39156762
filter the record source of the subform using the [Name] field taken from the listbox.

me.subformcontrolname.filter="[Name]=" & chr(34) & me.listboxname & chr(34) & "
me.subformcontrolname.filteron=true

you cna do this in the after update of thelistbox

also try this format

me.subformcontrolname.form.filter="[Name]=" & chr(34) & me.listboxname & chr(34) & "
me.subformcontrolname.form.filteron=true
0
 

Author Closing Comment

by:ssmith94015
ID: 39156821
Excellent.  Much simpler than I thought it would be.

Sandra
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question