dtempleton
MIS
Does anybody know a good way in VBA to parse the table names from a SQL string?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Begin InputTables
Name ="VanLoads"
Name ="VanDeliveries"
Name ="ClientSignatures"
Name ="DeliveryDetail"
Name ="Deliveries"
End
rs.Open "SELECT MSysQueries.Name1 FROM MSysObjects INNER JOIN MSysQueries ON MSysObjects.Id = MSysQueries.ObjectId WHERE MSysQueries.Attribute = 5 and MSysObjects.Name = '~sq_r" & AccRpt.Name & "'", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
If Not (rs.EOF And rs.BOF) Then
rs.MoveFirst
While Not rs.EOF
MsgBox rs.Fields(0)
rs.MoveNext
Wend
End If
rs.Close