S
SF
Hi,
I am traying to build a criteria string from a table that contain selected
ID (eg [ID]=1 or [ID]= 58 or [ID] =74 and so on).
I have code below that seem never work
Dim Stg As String
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim I As Long
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tmpSelected", dbOpenDynaset)
With rst
Do While Not .EOF
Stg = "[ID] = " & .Fields(0) & " Or [ID] = "
.MoveNext
Loop
End With
Debug.Print Stg
Could somebody advice
SF
I am traying to build a criteria string from a table that contain selected
ID (eg [ID]=1 or [ID]= 58 or [ID] =74 and so on).
I have code below that seem never work
Dim Stg As String
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim I As Long
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tmpSelected", dbOpenDynaset)
With rst
Do While Not .EOF
Stg = "[ID] = " & .Fields(0) & " Or [ID] = "
.MoveNext
Loop
End With
Debug.Print Stg
Could somebody advice
SF