Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box Skipover

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
Currently I have a form in an Access Database that contains a combo box which is linked to a feild (canadian status). When you open this combo box you are given 4 choices (canadian citizen, ..., other). When someone selects 'other' there is another field in which they must enter the appropriate data that 'other' refers to. For instance, if someone has a work visa they must select 'other' from the combox box and then enter 'work visa' in the subsequent field.

How can I make it so that when someone does not choose 'other' in the combo box, the program knows to skip over the subsequent field? I.E. if someone were to select Canadian Citizen from the combo box the program would automatically skip-over the next field (the one reserved for 'other' - where one would enter info such as work visa, etc).

Thanks,
Ryan.
 
One way is to set the txtBox enabled property.

In the ComboBox AfterUpdate event:

Private Sub Combo1_AfterUpdate()

If Combo1 = "Other" Then
txtBox1.Enabled = True
Else
txtBox1.Enabled = False
End If
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top