Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Arkansas, USA
    Posts
    163
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query linked to a combo box (access 2K)

    I have a combo box [SALN] which is linked to a query which runs when my main input form opens. This query will list all of the previous entries into the field [SALN]. I have a command button that opens a new record under the event Click. I am looking for the VB code to insert after the new record code, which will automatically run the query each time a new record is selected, so that the last entry is included in the combo box. i am assuming that there is a simple line of code which will accomplish this, or there is a line of code I need to run concerning the whole form each time a new record is added. I have been away from Access for a couple of months and would appreciate the help.

    Thanks in advance.

  2. #2
    Lounger
    Join Date
    Jan 2001
    Location
    Pennsylvania, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query linked to a combo box (access 2K)

    Try adding an event procedure in the OnAfterUpdate event for the form that does the following VB coding:

    Me.SALN.Requery

    This will rerun the query that is acting as the RowSource for the SALN combo box.

  3. #3
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Arkansas, USA
    Posts
    163
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query linked to a combo box (access 2K)

    Works like a charm. Knew it was something real simple.

    Thanks again.

Posting Permissions

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