W
wilcoit
How do I set visibility of a control on a form from a command button on a
previous form which is opening the new form?
previous form which is opening the new form?
wilcoit said:No I retyped the code -I had picked up the typo!
Here is the code I am using:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmHolderDetailsTempys"
stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms!frmHolderDetailsTempys!btnPermitIssue.Visibility = False
DoCmd.Close acForm, Me.Name
The code works fine without the Visibility line
--
dtw
freakazeud said:Did you just copied and pasted my code?
If yes...sorry I made a typo:
it should be ...Visible and not .Visisble!
It should work if you change that. If you set the property to TRUE the
control is visible if to FALSE it should hide.
HTH
Good luck
freakazeud said:Hi,
its the visible property not the visibility property, so you picked up the
typo, but changed it to something wrong
It would be:
Forms!frmHolderDetailsTempys!btnPermitIssue.Visible = False
HTH
Good luck
--
Oliver
Admin Specialist & Computer Science Major @ UMD - Go Terps -
http://www.oli-s.de
wilcoit said:No I retyped the code -I had picked up the typo!
Here is the code I am using:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmHolderDetailsTempys"
stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms!frmHolderDetailsTempys!btnPermitIssue.Visibility = False
DoCmd.Close acForm, Me.Name
The code works fine without the Visibility line
--
dtw
freakazeud said:Did you just copied and pasted my code?
If yes...sorry I made a typo:
it should be ...Visible and not .Visisble!
It should work if you change that. If you set the property to TRUE the
control is visible if to FALSE it should hide.
HTH
Good luck
--
Oliver
Admin Specialist & Computer Science Major @ UMD - Go Terps -
http://www.oli-s.de
:
I've tried that but get an error message:
"run-time error '438'
Object doesn't support this property or method"
--
dtw
:
Hi,
try:
DoCmd.OpenForm "YourFormName"
Forms!YourFormName.YourControlName.Visisble = True/False
HTH
Good luck
--
Oliver
Admin Specialist & Computer Science Major @ UMD - Go Terps -
http://www.oli-s.de
:
How do I set visibility of a control on a form from a command button on a
previous form which is opening the new form?
I've tried that but get an error message:
"run-time error '438'
Object doesn't support this property or method"
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.