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?
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?