Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Contact name not showing after 1st Vendor (Access 2002)

    I have included a very much cutdown version of a production database.
    What I cannot work out is why the Contact name on the form is only being shown for the 1st vendor and not subsequent vendors.

    The form is based upon purchase orders which have 2 fields that are related, these are Supplier or Vendor and the Contact name of it. The Vendor field is based on the Vendors List and the Contact name is based upon the Vendors Contact List. The 1st 3 purchase orders show the vendors contact name correctly but not subsequent contact names.
    Attached Files Attached Files

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

    Re: Contact name not showing after 1st Vendor (Access 2002)

    The control source of the CONTACT combo box restricts the contacts displayed to those for the selected vendor. This restriction is set when the form is opened, so for the vendor of the first record. The second and third record happen to have the same vendor, but the fourth has a different one. The record source, however, does not adjust itself automatically, so the contact for the fourth record is not valid.

    Solution: requery the combo box in the On Current event of the form (as well as in the After Update even of the vendor combo box):

    Private Sub Form_Current()
    Me.CONTACT.Requery
    End Sub

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Contact name not showing after 1st Vendor (Access 2002)

    Thanks Hans
    Talk about not seeing the wood for the trees.
    It's Saturday night, maybe I need to watch the footy rather than bash my head against a Access wall.

Posting Permissions

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