Getting the Current Object in VB?

J

Jaazaniah

I have a very base-level query that is run under up to 4 layers of
query to get final report data out. This low-level query used to be
split to include two sets of criteria, but I saw the work ahead of me
in producing 2 sets of queries for all these layers. The solution was
to set up a sub-layer that changes the SQL of this base query based on
user input from a msgbox function. So now it works...sort of. If I
have an object open and execute the query, it works fine. But if I
keep the object open and switch to design or sql view and back to
datasheet, the SQL being used doesn't update. That is to say:

Open Object> Prompt Yes/No> Yes> Proper Datasheet> Design or SQL view>
Prompt Yes/No> No> Improper Datasheet

This works in reverse too. I thought using a requery action for the
currrent object would fix this problem and consistently display the
right data, but I can't seem to find the right VB Class/Member to
simply give me the Current Object in the database window. Does anyone
out there know how?

P.S. Sorry if that was a lot of auxillery info, but context can often
help find a solution.
 

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