Can you cause an Update Query to run ahead of another Query In THAT Query's SQL

JJordan

Registered User.
Local time
Today, 00:06
Joined
Jul 25, 2002
Messages
53
I have a query written to Update a IndContacts.donor field (Yes/No Box) to Yes which I would like to cause to run Before a Query which generates all information about Donors keyed off that field (Donor). When I look at the SQL Statement it starts Select IndContacts.ContactID, etc..... Where IndContacts.Donor=Yes

Can I add anything to the Front end to Cause the Update Query to run First before the Select ?

I know I can do it with a Button on a form, but wondered if it can be done right in the Query itself.
 
wondered if it can be done right in the Query itself.

No.
But you should be able to do it from where you are opening your query (You say you wouldn't use a command button... But if you do not provide other info is difficult to give you a more accurate answer)
 
If you are doing this from under a command button, edit the VBA to run the update query before the query that selects whatever it is you wanted. There is nothing magic about the VBA code built by the command button wizard. You can add other things to it if you want.
 
Thanks.

Boy I wish I could learn the VBA commands better (I know how to run the update query first, but lotsa other stuff I want to do) :)
 
The only solution for "Boy I wish I could learn the VBA commands better" is to have a little database off to the side where you can experiment with things. To be honest, most of us learned what we know by getting hints from a book but then by trying to do what we wanted.

Experiment! It's healthy. It's natural. And if on an isolated database, it's usually safe, too.
 
Why do you believe that vba, updating a yes/no field are better than simply querying a table to find out who are donors?
I really am curious?
 

Users who are viewing this thread

Back
Top Bottom