Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Synchronise/Clear Combo Find with records (Access 2000)

    I used the combo wizard to create a dropdown that searches for a record in the current form. It is working well, but I would like to have the value synchronised or cleared when I move from record to record. IE: The value in the combo must show the name of the person of the current record, or it must be cleared of a value if the name of the current record is not equal to the combo. (Hope this is clear)
    The wizard created VBA code to find the record on the form. How do I modify this to add the synchronisation (or clearing) effect.
    Tx
    Regards,
    Rudi

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Synchronise/Clear Combo Find with records (Acc

    To clear just its value to null in the afterupdate event, at the end of the code that finds the record. If yous et it to null then, it will stay null when you move records.

    To synchronise it, use the oncurrent event of the form. Set the value of the combo to be equal to the value of the field that is used the search field - preumably the key field.


    Earlier today, in the post Multiple Combo Boxes, you can see an example of synchronisation (attached to the last post)
    Regards
    John



  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Synchronise/Clear Combo Find with records (Acc

    Ah, tx John. Your advice helped. I was mostly there, but I noticed that I had been trying to connect the combo (linked to the shipperID) with the "name" of the shipper and not the ID!! When I changed it to the ID it was working great!
    MAny Tx

    Private Sub Form_Current()
    Me.Combo9.Value = Me.ShipperID
    End Sub
    Regards,
    Rudi

Posting Permissions

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