Access pass through queries

B

bhorwitz@zachys

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 this thru an access qry but it is very clums

Thank yo
Bob
 
D

Dale Fye

B,

Not in my experience. What I usually do is create a pass-thru query that connects to the SQL or Oracle database. Then, using DAO, I set the querys SQL value to the string and then execute the query

Currentdb.querydefs("my-pass-thru").sql = strSQL

HTH

----- bhorwitz@zachys wrote: -----

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 this thru an access qry but it is very clumsy

Thank you
Bob
 
B

bhorwitz@zachys

Im not that familar with Dao or Ado. The way I perform this function in Access is:
1. using a macro I open the qry (an access qry not a Pass-thru) in design mode
2. I copy the strin
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