Results 1 to 5 of 5
  1. #1
    Stanislavnba is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2019
    Posts
    12

    Is it possible to have 2 queries opened in a form and using a row from the 1st to update the 2nd?

    I have a form with a couple subforms that update based on the data shown in the form, which is taken from a query.


    My problem is that I cant see all the rows simultaneously from the main query and I need to press next record every single time to get to where I want or just to browse all of the records.
    Is it possible to have the main query visible like a table or a report and when I select a row the rest of my subform queries update?

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,538
    Can you post a copy of the db with just a few dummy records so hat we might understand a little better
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Stanislavnba is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2019
    Posts
    12
    Here's a simple example. I have a table customers and I have a table with orders and a bunch of other things. Let's say, I want from my customers table to have a query with just the names of the customers who ordered something in the last one month. In another query to see which of these customers ordered what? And I want this done by selecting the row with the customer and my other query updating and showing me this customer ordered this items.

  4. #4
    Join Date
    Apr 2017
    Posts
    1,679
    Quote Originally Posted by Stanislavnba View Post
    I have a form with a couple subforms that update based on the data shown in the form, which is taken from a query.
    My problem is that I cant see all the rows simultaneously from the main query and I need to press next record every single time to get to where I want or just to browse all of the records.
    Is it possible to have the main query visible like a table or a report and when I select a row the rest of my subform queries update?
    Place your current main form (designed as continuous one) as subform into unbound form (no need to link it to anything). In unbound form have a hidden unbound text box. Create an OnCurrent event for this continuous form, which updates the hidden textbox in unbound form with current value of PK in your (previously main) form;
    Add your another form (your previous subform of your previous main form) into same unbound form as second continuous subform. Instead of linking it to PK of your another form, link it to hidden unbound text box in unbound form.

    In case you need several forms to be linked to your now continous main form, and it will be crowded in unbound form, you can have a tab control in your unbound form, and place all forms (or all linked subforms) into pages of this tab control.

  5. #5
    Stanislavnba is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2019
    Posts
    12
    Quote Originally Posted by ArviLaanemets View Post
    Place your current main form (designed as continuous one) as subform into unbound form (no need to link it to anything). In unbound form have a hidden unbound text box. Create an OnCurrent event for this continuous form, which updates the hidden textbox in unbound form with current value of PK in your (previously main) form;
    Add your another form (your previous subform of your previous main form) into same unbound form as second continuous subform. Instead of linking it to PK of your another form, link it to hidden unbound text box in unbound form.

    In case you need several forms to be linked to your now continous main form, and it will be crowded in unbound form, you can have a tab control in your unbound form, and place all forms (or all linked subforms) into pages of this tab control.
    Thank you! That worked out great.

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

Similar Threads

  1. Get Value from first form opened
    By Mister-B in forum Forms
    Replies: 4
    Last Post: 07-17-2021, 05:48 AM
  2. Replies: 13
    Last Post: 03-22-2018, 09:28 PM
  3. Replies: 5
    Last Post: 03-27-2017, 07:48 PM
  4. Replies: 9
    Last Post: 09-18-2014, 10:16 AM
  5. Replies: 3
    Last Post: 06-06-2012, 12:45 PM

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