Solved

Change subform based on a listbox on main form ACCESS 2003

Posted on 2013-05-10
2
974 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

695 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