filtering query results

N

Nick Monsour

HELP-HELP-HELP-HELP-HELP-HELP-HELP-HELP-HELP-HELP-HELP!

Hi all,

I have need to take a text box entry and use that information to filter
a query on. Whether to run the query or not is based on a choice made
by the form user in a drop down list box. So I know to set the
conditional to the drop down to run a query, however I don't know how
to tell the query to use the value entered in a different field to be
what the query is run on.

Example:
All entries have a NT Logon and if you want to 'modify' this user I
want to return whatever information that already exists for that user
so it can be modified.

I don't know much vbscript and only a small amount of SQL which is the
data source the form is based on. SO please try to be as specific as
you can for answering. (If I am lucky enough to get one)
Thanks for everything,

Nick
 
A

Andrew Watt [MVP - InfoPath]

Nick,

This answer won't help you I am afraid. I would expect what you
describe to "just work".

So, my guess at the moment is that you are doing something that you
shouldn't (or something that I am not understanding from your
description).

So what data source are you connected to? SQL Server? Is any part of
the query and/or data submission process working?

What part of the data source is the text box bound to?

If the view isn't intended always to query what else are you using it
for?

I guess I am trying to figure out why you are using a dropdown for
"whether or not to run the query". I would use a button. So, I am
assuming that there is something else about your view or form that I
haven't grasped yet.

Andrew Watt
MVP - InfoPath
 
N

Nick Monsour

Andrew,

I will try to explain better.
I have a SQL db (data source for the form) set up to gather information
about users (User); the user has many attributes in connected look up
tables. One of the attributes a user can have is different computer
system accesses (one to many) and database accesses (one to many), of
which the user may have more than 1. Now the InfoPath form I have
created is used to add 'New Hires'(1), 'Re-Hires'(2), 'Modify
Users'(3), 'Termination'(4), and 'Transfer'(5). This field is called
'Employment Status' and is on the form as a drop down list to choose
from. And the 'Employment Status' drop down list box only shows if the
'NT Logon=not blank', so it will be there.
So after the name and NT Logon text box fields are populated the user
must choose what action to take out of the 'Employment Status'. So if
the person whom the form is being filled out for is new all information
is put into the data fields. However if we want to modify a person
there is a section below the new data entry that becomes visible (due
to conditional formatting) to remove permissions the 'User' already
has.
What I need to do is if the users Employment Status' is 3, 4, or 5
(listed above) I have the conditional set up in the 'Employment Status'
properties to run a query of the main data connection but I need the
query to be only for the NT Logon that the person filling out the form
has put in the text box.
I hope this is clearer. And yes this form does submit

THank you,
Nick
 
N

Nick Monsour

Andrew,

I will try to explain better.
I have a SQL db (data source for the form) set up to gather information
about users (User); the user has many attributes in connected look up
tables. One of the attributes a user can have is different computer
system accesses (one to many) and database accesses (one to many), of
which the user may have more than 1. Now the InfoPath form I have
created is used to add 'New Hires'(1), 'Re-Hires'(2), 'Modify
Users'(3), 'Termination'(4), and 'Transfer'(5). This field is called
'Employment Status' and is on the form as a drop down list to choose
from. And the 'Employment Status' drop down list box only shows if the
'NT Logon=not blank', so it will be there.
So after the name and NT Logon text box fields are populated the user
must choose what action to take out of the 'Employment Status'. So if
the person whom the form is being filled out for is new all information
is put into the data fields. However if we want to modify a person
there is a section below the new data entry that becomes visible (due
to conditional formatting) to remove permissions the 'User' already
has.
What I need to do is if the users Employment Status' is 3, 4, or 5
(listed above) I have the conditional set up in the 'Employment Status'
properties to run a query of the main data connection but I need the
query to be only for the NT Logon that the person filling out the form
has put in the text box.
I hope this is clearer. And yes this form does submit.


Thank you,
Nick
 

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