Textboxes

  • Thread starter Thread starter Kyle
  • Start date Start date
K

Kyle

I have a form with a combo textbox & within it, I have a
number of options. I want to take only one (1) particular
option (when selected) to open another form. Does anybody
know how I would the following:

1. How do I find the value of a selected option within a
field?

2. what "code" do i write to execute?
 
I have a form with a combo textbox

A combo box is one type of control; a textbox is a different type of
control. There is no such thing as a "combo textbox"! Which do you
actually mean?
& within it, I have a
number of options. I want to take only one (1) particular
option (when selected) to open another form. Does anybody
know how I would the following:

1. How do I find the value of a selected option within a
field?

A field can only have one value.
2. what "code" do i write to execute?

I *THINK* - based on my guesses at the structure you have - is that
you would use the AfterUpdate event of the combo to check the value of
the combo box itself (which will be the value that the user selected).
Something like:

Private Sub comboboxname_AfterUpdate()
If Me!comboboxname = "the desired option" Then
DoCmd.OpenForm "formname", <options>
End If
End Sub
 
Back
Top