combo box entry

  • Thread starter Afrosheen via AccessMonster.com
  • Start date
A

Afrosheen via AccessMonster.com

Thanks for reading this.
Here's my question.

I have a combo box with a list of choices to choose from, and it works ok.
What I'd like to do is when I select a certain item from the list "Call Out"
I want the combo box after it's displayed to put an enter command after it so
it will automatically go to another field. Here's what I have so far.

If Combo44 = "Call Out" Then
Me!Notes.Set focus
End If

That works if I press then Enter key. I want it to read the field and if it
is the words "Call Out" have the combo box or something "Press the enter" and
have it go on to the notes field. This is done in the AfterUpdate() section.

I hope I've explained my self correctly.

Thanks
 
T

tina

when you type data into a combobox control, the control's AfterUpdate event
does not occur until you do something to make the control lose focus: like
pressing Enter, or clicking in/on another control, or closing the form, for
instance. if you use the mouse to select a value from the dropdown list,
then the AfterUpdate event fires automatically.

hth
 
A

Afrosheen via AccessMonster.com

Thanks for the reply Tina.
I may not be using in correctly then because when I click on the "Call Out"
item in the drop down all it does is display the name [Highlighted} in the
combo box and sits there. Nothing happens unless I move the mouse to the next
field or press the enter key. Now when I'm selecting the item or the "Call
Out" from the drop down I'm using the mouse then clicking on it. Maybe
instead of using the AfterUpdate() I should use the OnClick()?

Any suggestions? Does/did the AfterUpdate() comand look correct?
when you type data into a combobox control, the control's AfterUpdate event
does not occur until you do something to make the control lose focus: like
pressing Enter, or clicking in/on another control, or closing the form, for
instance. if you use the mouse to select a value from the dropdown list,
then the AfterUpdate event fires automatically.

hth
Thanks for reading this.
Here's my question.
[quoted text clipped - 15 lines]
 
P

pietlinden

this works for me...
Private Sub cboType_AfterUpdate()
If cboType = "Call Out" Then
Me.txtMemo.SetFocus
Else: Me.Received_Date.SetFocus
End If
End Sub
 
T

tina

your code looks fine to me; it's the same code i used to test the behavior
of a combobox control AfterUpdate event before i posted. i tested in an
A2000 db running in A2003; it's possible a different version of Access might
behave differently.

hth


Afrosheen via AccessMonster.com said:
Thanks for the reply Tina.
I may not be using in correctly then because when I click on the "Call Out"
item in the drop down all it does is display the name [Highlighted} in the
combo box and sits there. Nothing happens unless I move the mouse to the next
field or press the enter key. Now when I'm selecting the item or the "Call
Out" from the drop down I'm using the mouse then clicking on it. Maybe
instead of using the AfterUpdate() I should use the OnClick()?

Any suggestions? Does/did the AfterUpdate() comand look correct?
when you type data into a combobox control, the control's AfterUpdate event
does not occur until you do something to make the control lose focus: like
pressing Enter, or clicking in/on another control, or closing the form, for
instance. if you use the mouse to select a value from the dropdown list,
then the AfterUpdate event fires automatically.

hth
Thanks for reading this.
Here's my question.
[quoted text clipped - 15 lines]
 
A

Afrosheen via AccessMonster.com

Thanks for both replys. I'm using the 2003 version
your code looks fine to me; it's the same code i used to test the behavior
of a combobox control AfterUpdate event before i posted. i tested in an
A2000 db running in A2003; it's possible a different version of Access might
behave differently.

hth
Thanks for the reply Tina.
I may not be using in correctly then because when I click on the "Call Out"
[quoted text clipped - 19 lines]
 
T

tina

well, you're welcome, though my replies haven't got you where you want to
go. you might try the OnClick event, as you mentioned earlier in the thread,
and let us know how it turns out.

hth


Afrosheen via AccessMonster.com said:
Thanks for both replys. I'm using the 2003 version
your code looks fine to me; it's the same code i used to test the behavior
of a combobox control AfterUpdate event before i posted. i tested in an
A2000 db running in A2003; it's possible a different version of Access might
behave differently.

hth
Thanks for the reply Tina.
I may not be using in correctly then because when I click on the "Call
Out"
[quoted text clipped - 19 lines]
 
A

Afrosheen via AccessMonster.com

Thanks again for your reply. I did try the on click but I started getting
errors so I just gave up. Thanks again.
well, you're welcome, though my replies haven't got you where you want to
go. you might try the OnClick event, as you mentioned earlier in the thread,
and let us know how it turns out.

hth
Thanks for both replys. I'm using the 2003 version
[quoted text clipped - 10 lines]
 
Top