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

enable/disable fields

P: 27
I have part of a form where there are 3 fields to type in 3 questions. I want it so that the first question has to be typed in order for the second question to be typed and so forth. So when the form opens i want the code to check if the field in question1 is blank and if so, disable question 2 and 3. This is the coding i have so far but it doesnt seem to work. Any ideas? Thanks

Private Sub Form_Current()
If txtQuestion1 = Null Then
txtQuestion2.Enabled = False
txtQuestion3.Enabled = False
End If
End Sub
Jul 20 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 3,532
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.      If IsNull(Me.txtQuestion1) Then
  3.            txtQuestion2.Enabled = False
  4.            txtQuestion3.Enabled = False
  5.      End If
  6.  End Sub
What provisions have you made if txtQuestion1 is then filled in?

Linq ;0)>
Jul 20 '07 #2

Post your reply

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