Results 1 to 9 of 9
  1. #1
    Star Lounger
    Join Date
    May 2002
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Scrolling through unbound fields (Access 2000)

    Help <img src=/S/bananas.gif border=0 alt=bananas width=33 height=35>

    My unbound combo box field on a form won't scroll along with the data when I click on the right arrow or left arrow. How do I keep all the data together regardless if I use my unbound combo box or the scroll key?

    Thank you in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Scrolling through unbound fields (Access 2000)

    I'm sorry, I don't understand.

    What do you mean by "scroll along with the data"? If it's unbound, it has no relation to the record source of the form.
    What are the left arrow and right arrow? Do you mean the navigation buttons at the bottom of the form? If so, they have no influence on unbound controls.
    What do you mean by "keep all the data together"?
    What is the scroll key?

  3. #3
    Star Lounger
    Join Date
    May 2002
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scrolling through unbound fields (Access 2000)

    yes, it's the navigation buttons. When I use them to go forward to next record all the fields navigate except the unbound combo box field. How do I fix this?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Scrolling through unbound fields (Access 2000)

    An unbound control by definition is not connected with the record source of the form. Since the content of the combo box is not bound to the data, it stays the same when you navigate from record to record. What should happen with the combo box?

  5. #5
    Star Lounger
    Join Date
    May 2002
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scrolling through unbound fields (Access 2000)

    How do I create a drop down list users can select from? and if I use the navigation button, the drop down list should scroll with the rest of the data fields.

    Any ideas.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Scrolling through unbound fields (Access 2000)

    Please excuse me for keeping on nagging you with questions. Would you like the combo box to select a value for the current record? Or should it search through the records for the value the user selects, then navigate to that record? I think you mean the first option, but I'd like to be sure.

  7. #7
    Star Lounger
    Join Date
    May 2002
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scrolling through unbound fields (Access 2000)

    I apologize as well. My mind is running full speed.

    I have a form which displays data from a table. What I would like to do is give the user the opportunity to select a record from the drop down list and be able to see the corresponsing data. The unbound field works perfectly with the exception that it doesn't scroll when I use the navigation key. However, all of the other data on the form is scrolling. But, I'm not sure how to change the unbound combo box.

    Hope this helps. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Scrolling through unbound fields (Access 2000)

    OK, it's becoming clear now. You will need a little bit of VBA code. I can't give you the exact code, it depends on the names of controls and fields on your form, so I'll give an example that you must adapt to your situation. Let's say that your combo box is named cbxSearch, and that is looks up a field named EmployeeID.

    We're going to write an event handler for the On Current event of the form.
    Open the form in design view.
    Activate the Properties window. Make sure that the caption says Form.
    Activate the Event tab.
    Click in the On Current event.
    Select Event Procedure from the list.
    Click the Builder button - the three dots ... to the right.
    Complete the event procedure like the code below, but substitute the appropriate names:

    Private Sub Form_Current()
    Me.cbxSearch = Me.EmployeeID
    End Sub

    Note: you probably have an After Update event for the combo box. You can see which field this event handler uses to search. You should use this field instead of the EmployeeID in my example.

  9. #9
    Star Lounger
    Join Date
    May 2002
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scrolling through unbound fields (Access 2000)

    Thank You!! Hans

    It was exactly what I needed.

    <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •