Solved Visible issues

LMD2021

New member
Local time
Today, 08:25
Joined
May 29, 2021
Messages
4
I have a form A that I have made some fields that are not visible that is opened by command button 1.
I want to open that same form A and make those fields visible now from command button 2.
I created a Command button 2 with:
Code for a password access. Works, no issues
DoCmd which opens the form, Works, no issues
Now, I want the form to display the fields I previously made not visible.
Field1.visible=true
Field2.visible=true
But my fields do not display on the form.
How do I make the fields visible on the form?
 
Where did you put that code?
 
I put that code on the command button 2. I put the visible code after the DoCmd that opens the form.
 
You could try me.requery after your Field2.visible=true
 
As you have it now, that visible code would have to be in the form or refer to the whole formname
 
There are a ton of ways to do this. However, the best way might be to open the form and use something called "OpenArgs" to tell the form which way to open. Then in the Form_Load routine you can set or reset the visibility of whatever you want.


The other alternative is to create a public variable in a general module somewhere, or use a TempVars item to convey a value to tell the form to turn on or off the particular controls.
 
Excellent news. Glad I could point the way for you.
 

Users who are viewing this thread

Back
Top Bottom