Store Data from Query in Memory

Muzicmn

Registered User.
Local time
Today, 14:00
Joined
Nov 3, 2002
Messages
78
Sorry if this is an elementary question, but here goes.

What I want to do is have Access run a query based on the user name "taken from a login screen". That query will return some values such as what team the Supervisor is responsible for, what days off his team has etc...

This information will be used to display all other queries that particular sup runs. When another sup signs in obviously the results will be different

And onto the problem

I have the query running and displaying the result in a datasheet view. I created this to see if the queries work. Now what I would like is to do away with this query (it pops up at startup) and have access save the user name in memory instead of running this query. I also need to figure out how to reference this "user name" piece of data, that will be in memory on the queries.

would appreciate any help you can give on this topic. I have been trying to solve this issue for a loooooong time.

thanks again,

Ricky
 
Last edited:
I use a hidden form to hold this type of information. The form controls can be referrred to from queries and code and don't have the problems that globals do. If you want to make sure that they can't accidentally be changed, you can lock the fields on the form. The added advantage to the form is that you can have it visible during testing and even place values in it to test various logic paths.
 
Thanks for the reply. I was thinking about doing something like that.

Thanks again


Ricky
 

Users who are viewing this thread

Back
Top Bottom