- Код: Выделить всё
Dim a(2) as integer
rs.Source = "SELECT Structures.StructureName FROM Structures WHERE Structures.StructureID IN(" & a(1) & "," & a(2) & ")"
Dim a(2) as integer
rs.Source = "SELECT Structures.StructureName FROM Structures WHERE Structures.StructureID IN(" & a(1) & "," & a(2) & ")"
создавай строку запроса, используя цикл
For i=0 to UBound(a)-1
...
Next
For i = 0 To UBound(a) - 1
rsRpt.Source = "SELECT Structures.StructureName WHERE Structures.StructureID=" a(i)
Next
strQuery="SELECT Structures.StructureName FROM Structures WHERE Structures.StructureID IN ("
For i=0 to UBound(a)-1
if i=0 then
strA=a(0)
else
strA=strA & "," & a(i)
end if
Next
rs.Source=strQuery & strA & ")"
Сейчас этот форум просматривают: SemrushBot и гости: 33