UtterAccess.com
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    
 
   
Hugoj
post May 16 2018, 04:01 PM
Post#1



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
Hugo
Go to the top of the page
 
theDBguy
post May 16 2018, 04:06 PM
Post#2


Access Wiki and Forums Moderator
Posts: 72,962
Joined: 19-June 07
From: SunnySandyEggo


Hi,

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

Just curious...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
Hugoj
post May 17 2018, 04:31 AM
Post#3



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    18th August 2018 - 07:26 PM