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.
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.FindRecord Me!Cmb_Sic
'Set value of combo box equal to an empty string
Me!Cmb_Sic.Value = Null