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 8081377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:42:45+00:00 2026-06-05T16:42:45+00:00

I have a subform inside a parent form. The subform shows up as a

  • 0

I have a subform inside a parent form. The subform shows up as a datasheet inside the parent form.
I have two comboboxes in the parent form. When the user chooses a value from the combobox the subform should get filtered according to those two values.

The following is the code I used. It opens up another window and shows the filtered values instead of showing it within the parent subform.

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "3_Properties"

stLinkCriteria = "[Program_Name]=" & "'" & Me![Combo2] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Thanks

  • 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-05T16:42:47+00:00Added an answer on June 5, 2026 at 4:42 pm

    You can take advantage of link child and master fields to filter the subform without using any code. You can set the link master fields for your subform to the name of the combobox controls and the child fields to the relevant related columns (fields). Separate each entry with a semi-colon.

    You can also set the record source of the subform at run time.

     sSQL = "SELECT BText FROM Table WHERE AText = '" & Me.MyCombo & "'"
     Me.MySubformControlName.Form.Recordsource = sSQL
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Access form with a combobox and a subform on it. The
I have an access database with a parent form which has a subform in
I have a purchase form that has a continuous subform which shows line items
I have a form with a subform on it. If subform contains no records,
I have a sub form in Access: The CopyNo is a combobox that lets
I have a sub form that looks like a datasheet view. It returns prices
I have a form/subform for inputting data into an ado table. The main form's
I have an MS Access 2007 subform that is displaying data in continuous form
I have a form in a booking system which contains a subform which is
I have a main form that contains two other child subforms. When a textbox

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.