Try the above - Make a copy of your mdb first!!Code:Private Sub LoadEmailsUsed() '*** if this sub is in the forms module of hte form you are updaing you '*** don't need to refer to the form ' Loads all used emails so that they can be quickly selected by the user if necessary Dim Idx As Long Dim EmailRS As ADODB.Recordset On Error GoTo Err_LoadEmailsUsed Form_EmailList.CmbActioned.RowSourceType = "Value List" ' Clear the List CmbActioned.RowSource="-1;" Set EmailRS = New ADODB.Recordset EmailRS.Open "Emails", TheConn, adOpenKeyset, adLockPessimistic, adCmdTable EmailRS.MoveFirst Do Until (EmailRS.EOF) Or (EmailRS.BOF) ' Assuming the rst(0) has the id number - rst(1) the email address CmbActioned.rowsource=CmbActioned.rowsource & ";" & EmailRS.Fields(0) & ";" EmailRS.Fields(1) EmailRS.MoveNext Loop EmailRS.Close Set EmailRS = Nothing Exit_LoadEmailsUsed: On Error GoTo 0 Exit Sub Err_LoadEmailsUsed: MsgBox "Form_EmailList - LoadEmailsUsed - " & Err.Number & " - " & Err.Description Resume Exit_LoadEmailsUsed End Sub![]()




Reply With Quote