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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:06:52+00:00 2026-06-13T10:06:52+00:00

I have a form with a subform that are linked by an ID .

  • 0

I have a form with a subform that are linked by an ID. The problem is the subform has a combo box that needs a parameter from the main form for the row source.

The form is about sales calls and they need to be able to link many proposals and contracts as they want. The combo box for the list of proposals and contracts needs to be in relation with the mills or clients of this sales call.

I know I could do a Forms!FormName!ControlName to get the mill list but does this mean I have a design problem?

Or should I do a list filled when a user click on an element in a combo box in the main form? but then I would have to handle the save and delete myself.

Thank you

  • 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-13T10:06:54+00:00Added an answer on June 13, 2026 at 10:06 am

    If a subform requires a main form to function properly you can check for a parent. For example:

    Private Sub Form_Open(Cancel As Integer)
    Dim strParent As String
    Dim strSubname As String
    
        GetParent Me, strParent, strSubname
    
        If strParent = "None" Then
            MsgBox "This is not a stand-alone form.", , "Form Open Error"
            Cancel = True
        End If
    End Sub
    
    Function GetParent(frm, ByRef strParent, ByRef strSubname)
    Dim ctl
    
    On Error Resume Next
        strParent = frm.Parent.Name
        If Err.Number = 2452 Then
            Err.Clear
            strParent = "None"
        Else
            For Each ctl In frm.Parent.Controls
                If ctl.ControlType = acSubform Then
                    If ctl.SourceObject = frm.Name Then
                        strSubname = ctl.Name
                    End If
                End If
            Next
        End If
    
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a main form, frm_Main, and it has a subform in it, subform_Child.
I have a purchase form that has a continuous subform which shows line items
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 main form that contains two other child subforms. When a textbox
I have a main form with a tab control, and each tab has a
I have a PDF template (designed using Adobe Livecycle designer), that has a subform
I'm using Access 2007. I have a txt box that filters a subform called
I have a Form with a (Continuous) Subform that lists the results of a
I have an access database with a parent form which has a subform in

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.