Orange, I used your code for the list qry. I continue to get the same error as above. It cannot see the table in either code.
Code:
SELECT Left(MSysObjects.Name,InStr(MSysObjects.Name,"_Import")-1) AS TblNameWithErrors, MSysObjects.Id, MSysObjects.Name, MSysObjects.Flags, MSysObjects.TypeFROM MSysObjects
WHERE (((MSysObjects.Name) Like "*ImportErrors") AND ((MSysObjects.Type)=1));
or
SELECT MSysObjects.Name, MSysObjects.Flags, MSysObjects.Type
FROM MSysObjects
WHERE (((MSysObjects.Name) Like "*ImportErrors") AND ((MSysObjects.Type)=1));
I am using the VBA codes respectivly
Code:
Private Sub List0_Click()Dim strCriteria As String
strCriteria = "[TblNameWithErrors] = " & Me.List0.Column(0)
DoCmd.OpenTable strCriteria
End Sub
or
Private Sub List0_Click()
Dim strCriteria As String
strCriteria = "[Name] = " & Me.List0.Column(0)
DoCmd.OpenTable strCriteria
End Sub
My apologies as I am novice and self taught with access. Not sure if I am understanding you when stating "You can adjust how you use TblNameWithErrors (eg rowsource of Listbox)" as I have the Listbox as a query in the rowsource.