Okay so I cleaned up a bit using that . Thanks
Code:
Private Sub cmdLN_Click()
Dim db As DAO.Database
Dim strSQL As String
Set db = CurrentDb
db.Execute "DELETE * FROM tbl_tempCXlist;"
strSQL = "SELECT * FROM tbl_Customers WHERE tbl_Customers.LastName = '" & Me.txtLastName & "';"
lbOther.RowSource = strSQL
Me.lbOther.Requery
End Sub
Now I am still running into the same issue with the listbox where on the first click it shows the previous selection rather then the current selection (This occurs without changing the rowsource as well, it feels the lb.value is being updated after the mousedown event.
Code:
Private Sub lbOther_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim db As DAO.Database
Dim strSQL As String
Set db = CurrentDb
strSQL = "SELECT * FROM tbl_Customers WHERE tbl_Customers.ExcelCxId = " & lbOther.Value & ";"
Debug.Print ("Selection: " & lbOther.Value)
End Sub