Combo Box Tabbing Order, Navigation & Saving

  • Thread starter Thread starter Jamie H
  • Start date Start date
J

Jamie H

Guest
I am desperate for help as I am only an Access beginner!
I have included a combo box within a Form to allow the rest of the info on the form to be segregated.
I have the correct Tabbing order, but I can only select the value in the combo box by using the mouse, not the arrow keys (which Id like to) and confirm my choice by pressing return or pressing the Tab button again and moving on(which Id also like to)
I dont know any code whatsoever, so any guidance would be really appreciated!

also, can you have an action button set so you can find information by the value sey against it in the comobo box.

Ie. If a form was designed to allow a student to find what lessons they have on Mondays, they could enter all the lessons they have through the week and then select mon,tue,wed,thurs,fri from a combo box. So, when the student then wants to go back and see what lessons they have on a particular day, they can do this by a click of a button???
Also, when I save, it doesnt save properly?
 
Flattery will get you everywhere - thanks for you comments on another posting - however I'm certainly no guru.

I'm working on the down key problem I'll get back shortly.

For the other problem with updating the values on a form. I would place the combo on a 'Main' form, and have the rest of the records on a child form. Link the subform to the combo.value and on the update event of the combo requery the sub form.

[This message has been edited by Former (edited 11-14-2000).]
 
That took a little thinking about to get correct.

Right then, we have to trap for the down key being pressed when a combo has focus - set a boolean to say that it has been pressed - don't trap any subsequent down key presses - and lastly reset the boolean to False on loss of focus of the combo.

Create a combo called myCombo and slap the code below on your form and hopefully it'll work.


Option Compare Database

Dim mbExpanded As Boolean

Private Sub myCombo_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 40 And Not mbExpanded Then
Me.myCombo.Dropdown
KeyCode = 0
mbExpanded = True
End If
End Sub

Private Sub myCombo_LostFocus()
mbExpanded = False
End Sub

Private Sub Form_Load()
mbExpanded = False
End Sub


[This message has been edited by Former (edited 11-14-2000).]
 

Users who are viewing this thread

Back
Top Bottom