Solved

Change subform based on a listbox on main form ACCESS 2003

Posted on 2013-05-10
2
856 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
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

706 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now