Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2003
    Posts
    11

    Unanswered: Combo Box Problem - Tabbed Form

    I have a combo box on a form that I want to use to choose the record currently being edited on the form. The form is tabbed and based on two tables, CCBPIPE and Shipping. It lets me pick a value in the combo box, but doesn't update the rest of the form.

    BORROWER is the name field that I want the user to be able to pick the record by
    COMMIT_NO is the primary key
    Combo203 is my combo box

    Here is my code:
    Private Sub Combo203_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[CCBPIPE].[COMMIT_NO] = '" & Me![Combo203] & "'"
    Me.Bookmark = rs.Bookmark
    End Sub

    Any ideas?

  2. #2
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    run the code from behind a button and substitute the combo203 for a literal value

    see if you get the desired results

  3. #3
    Join Date
    Dec 2002
    Location
    Glasgow, UK
    Posts
    100
    if the COMMIT_NO is a number you need to drop the single quotation marks from the FindFirst statement ie

    rs.FindFirst "[CCBPIPE].[COMMIT_NO] = " & Me![Combo203] & ""

    It's the only thing that I can spot that could be wrong

  4. #4
    Join Date
    Jun 2003
    Posts
    11
    Ok, I'm really not observant at all. It should have been:
    rs.FindFirst "[CCBPIPE].[BORROWER] = '" & Me![Combo203] & "'"

    Hehe whoops.

    So now it's updating, but on random names now it just updates back to the first record. Why might it do that?
    Last edited by MissR605; 07-03-03 at 10:29.

  5. #5
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    Xander went exactly where I was headed - I wanted to see if you were placing a string in a number criteria

Posting Permissions

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