Results 1 to 7 of 7
  1. #1
    CoffeeFunnel is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    12

    How does a record source query identify the key, when the SQL is calling the table and not the form

    Hi All,



    Basic question, how does a record source query identify the key, when the SQL is calling the table and not the form?

    The query is a record source of a subform, and the primary form's record source is another query that does have the key that is used in the subform's query. I thought you had to reference the form object in a query in order to pass the key value over to the query?

    Can someone walk me through this?

    Cheers,
    CoffeeFunnel

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Are you asking about how a form/subform arrangement synchronizes the main and sub form records? The Master/Child Links properties of the subform/subreport container control manage this.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    CoffeeFunnel is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    12
    There isn't a Master/Child Links properties in the main form and subform. I don't know if this matters, but the main form and sub form are using filters.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    What do you mean there 'isn't a Master/Child Links properties'? You mean you haven't set those properties? Why not? Do the main and sub form data sources have a dependent relationship?

    Post the SQL statements of each RecordSource.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    CoffeeFunnel is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    12
    There just not there. My recordset type is Dynaset. But, I'm okay; I figured out a workaround for what I needed to do. I'm not sure how it's all working out internally, but I'm just updating the query definitions to pass form values into my SQL statement. It's much easier for me to work with SQL then with the form properties and stuff.

    Thanks for your help and time.

    Cheers,
    CoffeeFunnel

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    I'm glad you found a solution, however, your statements make no sense to me.

    The Master/Child Links are properties of the subform container control, not the form.

    Exactly how are you 'updating the query definitions'? The purpose is to synchronize the related records? This sounds more complicated than just setting Master/Child Links.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    CoffeeFunnel is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    12
    Hi,

    Sorry for the delay. Yes, you are correct. I found the Master/Child Link properties in the subform container control. They are blank, the source object is a query. I am working directly with the query definitions. Rather then through the MS access interface options. I just find this easier. Thank you again for the time.

    Thanks!
    Funnel + Coffee = Me

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query to identify new record
    By sukhjinder in forum Queries
    Replies: 8
    Last Post: 01-17-2017, 06:34 AM
  2. Replies: 1
    Last Post: 10-29-2014, 03:44 AM
  3. form - record source - select a table
    By johnseito in forum Access
    Replies: 13
    Last Post: 11-15-2013, 02:54 PM
  4. Replies: 4
    Last Post: 05-09-2012, 07:20 AM
  5. Replies: 2
    Last Post: 11-29-2010, 11:16 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums