Finding all occurances of a certain type GUI control - grep for Access?

You could use the QueryDef object to list alle queries, combo/listboxes, forms/reports that use a SQL-sting in its recordsource.

I think this will look "backwards" than what I was after. I do not keep any DAO.QueryDef objects in the FE DB. I dynamically create them via code just before they are needed.

I found one Combo Box with a raw SQL statement entered into it... something I understand performs less quickly than saving the query into a DAO.QueryDef object and having the control refer to the query object.

Also, I do not have a "special" prefix just for ComboBox controls. If they are suppose to be the GUI control for a database field, then the control is named according to my GUI field naming standard "fld*" where "*" is what ever the real DB column is the control displays.
 
I'm guessing using the code nanscombe provided has helped you find all the combo boxes in your db? By the way, it might be worth breaking out of the loop if a match is found so it can search quicker.
 
It's searching all of the controls on each of the forms in turn so if you were to break out of the loop it would only find the first ComboBox and then give up and move on to the next form.
 
Yeah, I think that's what he's after. He just wants to know which form or report objects contain combo boxes. Or is he looking to list ALL occurences in each object?
 
I think it's academic because he found the ComboBoxes by using the Documenter to output to a file and then Ctrl+F to find what he was after in the text document.
 
Mind you, as a bonus, he now has something which may be considered unusual ... A database with documentation. :D
 
Lucky chap he is. Michael will probably soon start saying, "they're at it again" :)
 

Users who are viewing this thread

Back
Top Bottom