Share via

Hide Text Boxes based on value in row

Anonymous
2019-10-15T09:08:20+00:00

Hi

I am stuck with a problem.  I have 3 text boxes in a row and I want to show or hide them based on if another field shows a 1, 2 or 3 or none if  0.

Currently I have them side by side and it looks a bit rubbish and would like them on top of each other only showing the one where the criteria matches.

The 3 fields are "text1", "text2" and "text3".  The field it is looking at is "completed"

Can anyone help?

Thanks

Aaron

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Duane Hookom 26,825 Reputation points Volunteer Moderator
    2019-10-16T15:01:02+00:00

    You can set up rules in conditional formatting. In design view you select the control that you want the appearance to change and the select conditional formatting from the Format tab. You then add a new rule that uses the Expression Is and enter your conditional expression. My field to check against was [AntherNumber] ([Checked] in the OP question) and I was checking for the value 4. I set the background and foreground to white to somewhat hide the value. This might not work as well if your section background color is not white. 

    There is a limit to the number of conditions that can be added to one control through the user interface.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2019-10-16T14:35:25+00:00

    Hi dhookom,

    Thanks for your clarification and rectification!

    Any kind of insight will be appreciated,

    Regards,

    Eric

    Was this answer helpful?

    0 comments No comments
  3. Duane Hookom 26,825 Reputation points Volunteer Moderator
    2019-10-15T20:43:14+00:00

    Eric Lu, clearly the links to Stack Overflow are related to a form in single record view and will not work for Aaron in a continuous form. If you set a control to hidden, it will be hidden for all visible records and I don't think that is what Aaron wants. 

    Some form of Conditional Formatting may work depending on exact needs.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2019-10-15T09:45:18+00:00

    Hi Aaron, 

    I suggest you posting your request to Stack Overflow community where devote to related question.   

    You may need to use VBA to achieve your goal and If you want to get further assistance about VBA, you can create a new thread in Programming category.

    If anyone have any solution and experience about the case, please share here. Thanks, 

    Regards,

    Eric

    Was this answer helpful?

    0 comments No comments