Automatic fill-in (1 Viewer)

D

D B Lawson

Guest
I want to be able to type a value into a text field and have the corresponding "group" appear in a combo box, ie:

(text box) (appear in combo box)
Age Age Group
1 1 - 5
3 1 - 5
12 12 - 15

I know this must be simple but I can't find the procedure anywhere.
 

Travis

Registered User.
Local time
Yesterday, 23:12
Joined
Dec 17, 1999
Messages
1,332
What you will need to do is set up a select case statement on the afterupdate of your Text Field:

Private Sub TextField_AfterUpdate()
Select Case Val(me.[TextField])
case 1,2,3,4,5
me.[ComboBox] = "1 - 5"
case 6,7,8,9,10,11
me.[combobox] = "6 - 11"
case 12,13,14,15
me.[combobox] = "12 - 15"
End Select
end sub
 

Users who are viewing this thread

Top Bottom