F
Frank Dulk
How do I do to recover in a query all the querys except for the querys
update and querys increments and querys exclusion?
update and querys increments and querys exclusion?
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.
Douglas J. Steele said:Action queries will start DELETE, UPDATE or INSERT INTO, while you want all
the queries that start SELECT. Assuming you've got a reference set to DAO,
the following untested air code should do what you're asking for:
Dim dbCurr As DAO.Database
Dim qdfCurr As DAO.QueryDef
Set dbCurr = CurrentDb()
For Each qdfCurr In dbCurr.QueryDefs
If Left$(qdfCurr.SQL, 6) = "SELECT" Then
Debug.Print qdfCurr.Name
End If
Next qdfCurr
Douglas J. Steele said:Action queries will start DELETE, UPDATE or INSERT INTO, while you want all
the queries that start SELECT. Assuming you've got a reference set to DAO,
the following untested air code should do what you're asking for:
Dim dbCurr As DAO.Database
Dim qdfCurr As DAO.QueryDef
Set dbCurr = CurrentDb()
For Each qdfCurr In dbCurr.QueryDefs
If Left$(qdfCurr.SQL, 6) = "SELECT" Then
Debug.Print qdfCurr.Name
End If
Next qdfCurr
Douglas J. Steele said:Yeah, you're right that that's probably better than what I suggested.
Frank Dulk said:But as I place that inside of a combo, for him to catch the names of the
querys?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.