bring up a form using a global variable

C

CD Tom

I have two databases that we are combining together, these databases are from
two different branches. When a user logs in there is a global variable that
shows which branch this user is from. When the two databases are combined
there are forms that when called up need to select only that data from the
specific branch. The one form I'm working on is driven by a query statement,
I've added the branch to the query but when I put the global variable in as a
qualifier it doesn't bring up any information. If I use just the branch
number the it works. I've put the variable on the form and tried using the
[forms].[formname].[vbranch] it still doesn't work. It shows the branch on
the form so I know it's getting the number ok but the query will not bring it
up.
Hopefully someone has an answer. Thanks for all the help.
Tom
 
S

Sprinks

Tom,

It might be a data type issue. Does the query need a numerical value? If
so, try using =Val(Forms![YourForm]![YourControl] as the selection criteria.

Sprinks
 
C

CD Tom

The branch is a text field. PDX

Sprinks said:
Tom,

It might be a data type issue. Does the query need a numerical value? If
so, try using =Val(Forms![YourForm]![YourControl] as the selection criteria.

Sprinks

CD Tom said:
I have two databases that we are combining together, these databases are from
two different branches. When a user logs in there is a global variable that
shows which branch this user is from. When the two databases are combined
there are forms that when called up need to select only that data from the
specific branch. The one form I'm working on is driven by a query statement,
I've added the branch to the query but when I put the global variable in as a
qualifier it doesn't bring up any information. If I use just the branch
number the it works. I've put the variable on the form and tried using the
[forms].[formname].[vbranch] it still doesn't work. It shows the branch on
the form so I know it's getting the number ok but the query will not bring it
up.
Hopefully someone has an answer. Thanks for all the help.
Tom
 
C

CD Tom

Well I found the answer it was a dumb thing on my part, all I needed to do
was a me.requery on the form activation and it works. Thanks for the help.

Tom

Sprinks said:
Tom,

It might be a data type issue. Does the query need a numerical value? If
so, try using =Val(Forms![YourForm]![YourControl] as the selection criteria.

Sprinks

CD Tom said:
I have two databases that we are combining together, these databases are from
two different branches. When a user logs in there is a global variable that
shows which branch this user is from. When the two databases are combined
there are forms that when called up need to select only that data from the
specific branch. The one form I'm working on is driven by a query statement,
I've added the branch to the query but when I put the global variable in as a
qualifier it doesn't bring up any information. If I use just the branch
number the it works. I've put the variable on the form and tried using the
[forms].[formname].[vbranch] it still doesn't work. It shows the branch on
the form so I know it's getting the number ok but the query will not bring it
up.
Hopefully someone has an answer. Thanks for all the help.
Tom
 

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