X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Form Visible Does Not Read Query Criteria, Access 2016    
post May 16 2018, 04:01 PM

Posts: 16
Joined: 22-August 10

I have a main form and 5 subforms.
From subform1 I after entering data I want to open subform2. Subform2 recordset is a query and the criteria refers to a control on subform1.
If I open subform2 with docmd.openform everything works fine with the data. But then it covers the whole screen and I want subform2 to have the same size and position as subform1.
From start both subforms visible=False and have the same size and position. If I use subform2.visible = True the underlying query does not seem to read subform1 control.

My aim is to in one way or another to read the control from subform1 and use that data to filter the recordset when I make subform2 visible and keep the size and position.

Best regards
Go to the top of the page
post May 16 2018, 04:06 PM

Access Wiki and Forums Moderator
Posts: 74,178
Joined: 19-June 07
From: SunnySandyEggo


Have you tried "requerying" subform2 before setting it to visible=true?

Just curious...
Go to the top of the page
post May 17 2018, 04:31 AM

Posts: 16
Joined: 22-August 10

Oh my! It was that simple! thanks.gif
This post has been edited by Hugoj: May 17 2018, 04:33 AM
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    17th January 2019 - 06:13 PM