Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8687101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:02:12+00:00 2026-06-12T23:02:12+00:00

Note: I’m working with a large complex database, so for clarity’s sake I have

  • 0

Note: I’m working with a large complex database, so for clarity’s sake I have simplified the set up below.

I struggled a bit with how to title the question since it’s a bit of a complex question. I hope it’s accurate enough….

A bit of background first:

I have an Access 2010 database that contains a one-to-many relationship between a table Called “Products” and a table called “Datasets” (ie I have a bunch of products, and each product has multiple datasets). Each has an autonumber key field (p_ID and d_ID respectively) as well as numerous other fields.

I have a form (lets call it frm_Main) that has two subforms: sub_Products (based on the “Products” table) and sub_Datasets (based on the “Datasets” table). On the main form I have a control ctrl_SelectedProduct which is linked to [sub_Products]![p_ID] to see which record in sub_Products is selected / has the focus, and the sub_Datasets subform is linked to this control so that it only displays Datasets records that belong to the selected Products record.

On the main form I also have a number of controls that I’m using for filtering the data in the subforms. For example, I have a control ctrl_Category. I have this control coded so that when the user changes the value of the control, a filter is applied that limits the records in sub_Products to only those that have a p_Category value equal to whatever is chosen in ctrl_Category. If the control is blank, it will show all records. All this works great when if comes to filtering based on fields in the Products table.

Now the problem:

My problem is that I also want to be able to filter based on fields in the Datasets table. For example, Datasets has a field called d_Status. I want the user to be able to chose the status in a control (ctrl_Status), and based on this:

1) sub_Products will be filtered to display only those Products records that have an assotiated Datasets record (or records) that has d_Status equal to whatever was chosen in ctrl_Status

then

2) when a Products record is selected in this filtered sub_Products, sub_Datasets will only show the Datasets records that has d_Status equal to whatever was chosen in ctrl_Status

I know how to do part2. But I have no idea how to get part1 to work. Since sub_Products is currently based on the Products table, which does not have the d_Status field, I have no way to filter it based on that field. Thus, I’m assuming my first step will be to change my setup so that sub_Products is based on a query that combines the two tables (or at least adds the d_Status field).

If I do that, however, I get duplicate Product records. I can’t use the query’s Unique Values property because if I have a product that has two datasets, one with status “Current” and a one with status “Archived”, then those aren’t considered duplicates, and the product info is there twice. If I don’t have the status field displayed, it shows only unique products initially, but then I can’t subsequently apply a filter based on that non-displayed field.

I also tried basing sub_Products on a Totals query in order to utilize the Group By functionality, but I still couldn’t get it to work right. Even if I could I don’t think that’s the best solution, because you can only have 10 fields with Group By, and my Products table has more than 10 fields that I need displayed in sub_Products.

I feel like I’m now just going around in circles and am at a loss of what to try from here. Please help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:02:13+00:00Added an answer on June 12, 2026 at 11:02 pm

    Couldn’t you add something like this?

    Private Sub ctrl_Category_AfterUpdate()
        Form_frm_Main.Recordsource = "Select * from Products where p_ID IN(" & _
                                     "Select p_ID from Datasets where d_Status = " & _
                                     Me!ctrl_Category.Value & ")"
    End Sub
    

    Alternately, you can access the childform via the parent of the other child form.
    This is a non-working snippet just to give you the idea:

    Me.Parent.otherChildFormName.Form.Recordsource = whatever
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Note: This is for MySQL's SQL, not SQL Server.) I have a database column
NOTE: This is a followup to my question here. I have a program that
NOTE: I have read Routing From the Inside Out AND the Engine Yard blog
NOTE : I have edited my question because of my input data present in
NOTE: I have updated this since originally asking the question to reflect some of
Note that when I say client, I mean businesses or organizations that have signed
Note: The answers & comments below reflect the state of legacy browsers in 2009.
Note: To answer this question, you shouldn't have to know anything about Selenium or
note from N00B land again. I have read lots about sorting arrays - wanted
NOTE: This is an entire rewrite of the previous question. I have a model.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.