Update list box when a new record added.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MerlinS
    New Member
    • May 2008
    • 1

    Update list box when a new record added.

    Using Access 2003.
    I have a form and a subform.
    On the main form, one of the fields is a lost box, which lists line numbers ie 1, 2, 3 etc.
    Then the list box is clicked, the subform corresponding to the line number info is shown.
    When a new record is added to the subform the new line number is added and is shown in the main form list box.
    The list box on the main form gets the focus and the new line number is highlighted.
    However the new highlighted line info is not used, but because the list box is requeried the first line info is used to call up the subform, although the new line is highlighted.
    When the record in the sub form is created, I want the list box to be requeried and the new record line to be highlighted and the new record to be shown.
  • hjozinovic
    New Member
    • Oct 2007
    • 167

    #2
    hi Merlin!

    Maybe you could try to requery the subform control after the code that made your list box show the last item.

    If you can copy/paste here your code that manipulates the list box, than it would be easier to help you with your question.

    regards,
    H.

    Comment

    Working...