473,324 Members | 2,511 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Toggle field display on an Access form

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
1 3846
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: leegold2 | last post by:
I wondered if anyone would give me code- I think it would be easy, but I'm a complete newbie. What I want to do is to show many tables in a brief truncated format and then for each table offer the...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
3
by: Ray | last post by:
I recently upgraded from Access 97 to Access 2003 and just enter some new data into table via an input form. The form has one hyperlink field to contain a file path. In Access 2003, it appears...
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
4
by: Neil Coleclough | last post by:
I am constructing a database to process product returns for my Company. I have a number of toggle buttons to identify the stage to which each return has been processed. For example, clicking the...
3
by: Dica | last post by:
i want to set up my aspx page with a hierarchical navigation system. first the user has to select to "-- Select An Action --", which could be either "Add Item" or "Edit Item". If the user selects...
4
by: cwoll | last post by:
I am runing this function to toggle buttens to display an "X" when they is selected, the butten is linked to a yes/no field. This function works good, the problem I am having is that when I make a...
6
by: plumba | last post by:
Hi I have a check box which when ticked displays the sumit buttons of a form and gives the checkbox field a value of "agree". I would like to set the check box to hide the section of the form...
2
by: Chuck | last post by:
How can I make an array of command buttons (or toggle buttons) on a form and have a text box on the same form display the index of the button clicked? This works very well in VB6, but I can't...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.