Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / December 2005

Tip: Looking for answers? Try searching our database.

Query database with Where statement is string in text box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NikV - 21 Dec 2005 20:16 GMT
This might be a newbie question but any help would be great.  I have a text
box with a query button next to it.  The user will put the Account number in
the text box.  After that the user hits the button to query.  I want InfoPath
to query the database with the account number in the text box.  Can this be
done without using code?  If code is a must then please help me in Visual
Basics.  Please help.  Thanks!
Andrej - 22 Dec 2005 10:12 GMT
Hello NikV,

as i understand you created a form based on a database?
so you have query fields in your datasource.
you can use this query fields to run a query. you can set a property of a
pushbutton control to run the query against the database.

cu

> This might be a newbie question but any help would be great.  I have a text
> box with a query button next to it.  The user will put the Account number in
> the text box.  After that the user hits the button to query.  I want InfoPath
> to query the database with the account number in the text box.  Can this be
> done without using code?  If code is a must then please help me in Visual
> Basics.  Please help.  Thanks!
NikV - 22 Dec 2005 15:28 GMT
That's correct, but how do you have the query filter out only what the user
types in the text box?  For example i have a account number.  The user puts
in the account number in the text box and clicks query....how do I get
infopath to give me the record that is associated with this account number.  
Does that make sense?  Thank you for your help!

> Hello NikV,
>
[quoted text clipped - 11 lines]
> > done without using code?  If code is a must then please help me in Visual
> > Basics.  Please help.  Thanks!
Andrej - 23 Dec 2005 10:03 GMT
Sorry, i do not understand the problem:

in your datasource you have following picture:
myFields
  queryFields
  dataFields

under the node queryFileds you have all Field which you can use to run a
query against the database.

put a field for account number from query node in your form
put a button whit property "run query" in your form

put the first childnode of dataFileds in your form as "section with
controls" (datasection)

preview the form
put a valid account number into your queryfield you inserted into the form
push the button.

if there is a record it will be show in the data section

i hope i could help you

> That's correct, but how do you have the query filter out only what the user
> types in the text box?  For example i have a account number.  The user puts
[quoted text clipped - 17 lines]
> > > done without using code?  If code is a must then please help me in Visual
> > > Basics.  Please help.  Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.