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

Continuous Forms and making a field invisible depending on another field

P: 2
Hello all.

I have a continuous form that I need to make a field invisible or visible depending on the selection in another field. I have tried using Form_Current() and the following code:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.      If VisitType = 3 Then
  3.           Me.cboMonitor.Visible = True
  4.      Else
  5.           Me.cboMonitor.Visible = False
  6.      End If
  7. End Sub
Of course this does not work. It changes all of the records based on the selected or active record. I am using Access 2003 on Windows XP Pro.

Am I just being silly and overlooking something or does someone have a wise and masterful solution.

Thanks
May 2 '07 #1
Share this Question
Share on Google+
4 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
In form design view go to the Format - Conditional Formatting. It won't allow you to toggle visible and invisible but it will allow you to disable the combobox.
May 4 '07 #2

P: 2
In form design view go to the Format - Conditional Formatting. It won't allow you to toggle visible and invisible but it will allow you to disable the combobox.
How would I go about doing this?

Thanks
May 9 '07 #3

missinglinq
Expert 2.5K+
P: 3,532
Click on the combobox to select it
Goto Format > Conditional Format
In Condition select Expression Is
In the box to the right type VisitType <> 3
You'll see B(old) I(talics) U(nderline) ForeColor BackColor Enabled
Click on Enabled (which looks like a rectangle with squiggles inside it)
This actually sets Enabled to False

Good Luck!
May 10 '07 #4

NeoPa
Expert Mod 15k+
P: 31,276
How would I go about doing this?

Thanks
The instructions are in Mary's post (#2).
What precisely, are you having trouble with?

*edit*
Didn't catch Linq's post. No need to respond to this directly if that post (#4) gives you what you need.
May 10 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.