Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Posts
    43

    Arrow Unanswered: updating other field when combobox change?

    hi
    i wanted to ask how to update the data when i change the combobox.
    because in my form when i change the combobox "id" other field like name,address is not changing according to id...

    help pls

  2. #2
    Join Date
    May 2004
    Location
    South Australia
    Posts
    39

    Bound Column

    Hi

    The only real thing I can think of here is to check what the bound clolumn is set to. If there is one field in you combobox it should be set to 1 (I think ).

    If you created it by hand, try using the wizard as this should set everything up correctly so you can compare it with yours.

    frekster
    Last edited by frekster22; 06-13-04 at 00:47. Reason: Added detail

  3. #3
    Join Date
    Jun 2004
    Posts
    43
    this is the code by using wizard... can someone convert this to a more understandable code?


    Private Sub customerid_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[customerid] = " & Str(Nz(Me![customerid], 0))
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
    End Sub

  4. #4
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Quote Originally Posted by oeuf85
    this is the code by using wizard... can someone convert this to a more understandable code?


    Private Sub customerid_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[customerid] = " & Str(Nz(Me![customerid], 0))
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
    End Sub
    Hi oeuf85,
    Also, check in the Form/Properties and look for the OnCurrent Event. If the wizard didn't create it simply do this. In the OnCurrent event for the form input this code:
    Me!CustomerID = customerid

    have a nice one
    Bud

Posting Permissions

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