Weird simple code not working

mvorous

mvorous
Local time
Today, 03:17
Joined
May 29, 2008
Messages
46
Hello, first post..., I have installed, and now have re-installed the MS Office 2007 Suite Professional onto my Vista OS, due to this problem. I am simply trying to use VBA to make a textbox invisable when a button is clicked.

Option Compare Database
Private Sub cmdMakeTxtInvisible_Click()
Text62.Visible = False
End Sub

Any help here? I don't have any "Missing" references.
Thank you, mvorous
 
I'm not 100% sure here, but looking at the properties for testbox/visible, all I see is a Yes or No option. Have you tried the word No instead of False?
 
In Visual Basic Editor, go Tool -> References.

See if there's any checkbox next to MISSING:....
 
Yes I have, True/False, Yes/No & -1/0, but the intellesense (if I got that right, offers the True/False...
Thx
 
Try This

Hi

Have you tried:

Me!Text62.Visible = False

or

Forms![name_of_your_form]![Text62].Visible = False

I have not got 2007 or vista but maybe the syntax required is a bit less forgiving

All the best

Tony
 
Tried this...

Option Compare Database
Private Sub cmdMakeTxtInvisible_Click()
Me.Text62.Visible = False
Me.Text62.Visible = No
Me.Text62.Visible = 0
End Sub

Thx
 
Is the database in a trusted location?
 
I just quickly created a new DB with a few new fields in a new table, the code worked as it should. Here is the difference in the other situation,
The Tables are all imported as I need it to be a Front-end/Back-end relationship.
Does this help?
Thx
 
If a new DB worked, then it may be due to a corruption. Just re-do the import and see if it work still.
 
Yes, that was it. A non-secure or rather non-trusted issue, thank you very much.
 

Users who are viewing this thread

Back
Top Bottom