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 / June 2007

Tip: Looking for answers? Try searching our database.

Auto-fill text box from SQL db

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Markf - 15 Jun 2007 01:50 GMT
Hello,

New to InfoPath and I am stumped. I am trying to auto-fill a text box
control with SQL data that would be dependent on two drop-downs and enable a
user to edit the contents of the text box before submitting the form.

I can pull the data from the SQL db for the two drop-down boxes and can get
the first value (Ex. ‘Computer1’) to populate the text box but that is all
that I can get. How can I populate with the remaining computer names in the
text box based on the input from the two drop-downs?

Thanks!
Mark

1) Query #1 = data for drop-down box #1
2) Query #2 = data for drop-down box #2
3) Query #3 = data for text box where user can edit server list (Ex.)
‘ComputerName’ field is the only thing I want to populate the text box with
and I use InfoPath data filters to filter on the two drop-downs.

Ex.
Computer1 -> auto-filled
Computer2 -> auto-filled
Computer3 -> auto-filled; user deletes this line
Computer4 -> auto-filled
Computer5 -> user adds this line

Query #1
SELECT     ApplicationVersionID, ApplicationName, Applicationstatus
FROM         Applications AS Applications
ORDER BY ApplicationName

Query #2
SELECT     EnvironmentID, EnvironmentName
FROM         Environments AS Environments
ORDER BY EnvironmentName

Query #3
SELECT     svr.ComputerName, ap.ApplicationName, env.EnvironmentName
FROM         Servers AS svr INNER JOIN
                     Allocations AS alloc ON svr.AssetNumber =
alloc.AssetNumber INNER JOIN
                     Assignments AS asn ON alloc.AssetNumber =
asn.AssetNumber INNER JOIN
                     Applications AS ap ON asn.ApplicationID =
ap.ApplicationVersionID INNER JOIN
                     Environments AS env ON alloc.EnvironmentID =
env.EnvironmentID
Markf - 15 Jun 2007 22:51 GMT
I am wondering now if I went about this the wrong way. Is there another way
to bring the results of a SQL query into a form and then to allow a user to
edit those results before submitting the form?

Thanks for any help!
Mark

> Hello,
>
[quoted text clipped - 44 lines]
>                       Environments AS env ON alloc.EnvironmentID =
> env.EnvironmentID
 
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.