New to VBA and trying to build qry via VBA

B

Bob H

I would like the end user to be able to build a string in Access (in an unbound field) on a form. I have done this by allowing the user to click on check boxes for the fields that they need to see. I then take this information and create the string, this allows the user to see the string that they created. My question is, now that I built the string in Access can I have the Pass-Through qry look at this field for the string? Could I also allow the user to set the sort by using the same method? I could do some of this thru an access qry but it is very clumsy using the following steps

1. using a macro I open the qry (an access qry not a Pass-thru) in design mode
2. I copy the string from the for
3. I paste the string into the first grid in the qry.
4. Save the qr
5. Execute the qr
This is all done via a macro and it is quick enough where the end users doesnt see the qry in design mode. However I feel that there is a better way of doing this, and I would also like to give the user the abilty to adjust the sort. Do you think that this could be done thru VBA
 

Ask a Question

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.

Ask a Question

Top