0
votes

I am knew to access and don't have very much knowledge.

Basically, I have 2 buttons in form1 which open form2. Form 2 contains text boxes. I want to have a button on form1 which loads form2 and hides textbox1, and also another button that loads form 2 but does not hide textbox1. I have managed to hide the text box in form2 using .visible=False code in form2, however, as explained, I need to do this from form1.

TIA

Dan

1

1 Answers

0
votes

You can pass a parameter with the OpenForm OpenArgs then the called form can extract that parameter in its Open or Load or Current event.

DoCmd.OpenForm "formname", , , , , "some text here like 'hide' or 'nothide'"

Then in the called form:

Me.textbox.Visible = Me.OpenArgs = "nothide"