Here's what I'm trying to do. All of the re****ts in my Access 2007
application are opened via a dialog box that allows the user to pick
filter criteria. On this dialog box there is a "Sort" button. When the
user clicks on that button, a second dialog box opens that allows the
user to choose the fields they want to order by. The sort dialog box
form has four combo boxes containing a field list from the
recordsource of the re****t. The rowsources for these combo boxes are
populated when the user clicks the Sort button, and in order for this
to work the original dialog box needs to know what the recordsource of
the re****t is.
The way I was doing this was for the OnClick event of the Sort button
to open the re****t invisibly in design view, check the recordsource of
the re****t, and then close the re****t again. This is the VBA statement
I was using to open the re****t:
DoCmd.OpenRe****t strRe****t, acViewDesign, , , acHidden
Well, here's where the problem comes up. Once I convert the accdb file
to an accde file, I can't open the form in design view anymore. I have
tried opening the re****t in Re****t and Print Preview using the
acHidden variable for the WindowMode argument, but the re****t is
visible when I do this.
Is there a way to open a re****t invisibly in preview or re****t mode?
Or is there a better way to determine a re****t's recordsource in code
without opening the re****t at all?
Thanks!


|