[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Change subform based on a listbox on main form ACCESS 2003

Posted on 2013-05-10
2
Medium Priority
?
995 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 2000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

656 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