By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,301 Members | 3,690 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,301 IT Pros & Developers. It's quick & easy.

Toggle field display on an Access form

P: n/a
Hi all,
Hum i just erased the whole message by mistake, :(
Ok so i want to hide a specific field in an Access form using a toggle
button, but i cant seem to get the right syntax. Right now im using a
macro to toggle the Visible bit (SetValue), but i want to add a filter
which would, when i press the button, compare the field value (string)
with another string, "No Action" for example, and then decide wheter to
hide the field or not.
What I have now looks like that:
IF ([...] = "No Action", [...].[Visible] = No, [...].[Visible] = Yes)
But it doesnt work at all. I tried changing the syntax without success.
Could anyone give me a hand plz?
Thanx alot
Mike

Sep 19 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Mike" <la***********@gmail.comwrote in
news:11**********************@d34g2000cwd.googlegr oups.com:
Hi all,
Hum i just erased the whole message by mistake, :(
Ok so i want to hide a specific field in an Access form using
a toggle button, but i cant seem to get the right syntax.
Right now im using a macro to toggle the Visible bit
(SetValue), but i want to add a filter which would, when i
press the button, compare the field value (string) with
another string, "No Action" for example, and then decide
wheter to hide the field or not.
What I have now looks like that:
IF ([...] = "No Action", [...].[Visible] = No, [...].[Visible]
= Yes) But it doesnt work at all. I tried changing the syntax
without success. Could anyone give me a hand plz?
Thanx alot
Mike
Forget the f'ing macro. Use a command button. In the Command
button's OnClick event, put the following line ov visual basic,
substituting appropriate field names and strings.

me.txtBoxToHide.visible = (me.txtboxFieldtoCheck = "text to
check").
If it works backwards, make it .visible = NOT (me.
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Sep 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.