Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Location
    Houston, TX
    Posts
    116

    Unanswered: Form - select record to display

    I am trying to get a form to select records from what choice is selected. On my form "Log calls..." there are three choices. The first choice lets you select the "SIC" but the record briefly displays then is replaced by the 1st record. Also I want the drop-down to summarize the choices - currently if there are duplicates it shows each one. I wanted the selection to show the summary of all records then when that choice is made it shows only those records. For example: Total records = 50, select choice state=TX, display would then show records = 5 and the first TX record is displayed. I hope this makes sense and someone can help me. I'm just learning VB and don't fully understand it all.

    thanks . . . texasalynn
    Attached Files Attached Files
    texasalynn
    It's AWL Good!

  2. #2
    Join Date
    Jun 2002
    Location
    Houston, TX
    Posts
    116
    Can anyone help please?
    texasalynn
    It's AWL Good!

  3. #3
    Join Date
    Dec 2004
    Location
    Maryland
    Posts
    5
    DoCmd.ShowAllRecords causes the return to the first record.
    Remove that line and that problem should be solved.

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

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[SIC1] = '" & Me![Cmb_Sic] & "'"
    Me.Bookmark = rs.Bookmark
    'Moves to Customer Name text box and
    'finds the record of whatever name is selected in the combo box
    'DoCmd.ShowAllRecords
    Me!BUS_NAME.SetFocus
    ' DoCmd.FindRecord Me!Cmb_Sic

    'Set value of combo box equal to an empty string
    Me!Cmb_Sic.Value = Null
    End Sub

Posting Permissions

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