[AccessD] MS InfoPath and OneNote

MartyConnelly martyconnelly at shaw.ca
Mon Nov 3 13:28:20 CST 2003


Haven't touched onenote.

I have played around with InfoPath, I think it is MS first pass at XForms
They only released the XForm recomendation from W3C in last couple of 
months.
You can use with SQL Server and Access and use through IE explorer
some notes I made while playing around. Look at decision tree on when to 
use.
Security and cross or multi domain use still have a way to go or are 
incomplete.
You need IIS to test out completely.


Info Path SQL Server link sets all your info path forms to specific 
server should be run intially before use
http://www.msdn.microsoft.com/library/default.asp?url=/library/en-us/ipsdk/html/ipsdkConfiguringTheSampleForms.asp

----------------------

Decision tree when to use InfoPath
http://msdn.microsoft.com/library/en-us/odc_ip2003_ta/html/odc_IPInfoPathDecisionTree02.gif
and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_ta/html/odc_ipinfopathdecisiontree.asp

----------------------
Internet domains can be really tricky. For reference,
path you browse to to fill out the form (ie. 
http://myServer/mySite/myForm.xsn)
see Regform tool from SDK about .xsf

verify the safety settings in internet explorer tool->options security
tab-> and enable allow data access across domains
---------------------

Exercise 1 Designing a Form from a Database
In this exercise, you will create a new form based on a database.

1. Open InfoPath and click Design a Form& on the File menu. This brings up
the Design a Form task pane.
2. In the Design a Form task pane, click New from Data Source&.
3. In the Data Source Setup Wizard dialog box, select Database (Microsoft
SQL Server or Microsoft Office Access only) as the type of data source you
want to use for your form and click the Next button.
4. Click the Select Database& button.
5. Browse to the Northwind.mdb database in the "C:\Program Files\Microsoft
Office\Office11\Samples" directory and click the Open button.
6. In the Select Table dialog box, select the Orders table and click the OK
button.
7. In the Data Source Setup Wizard dialog box, click the Add Table& button.
8. In the Add Table or Query dialog box, select the Order Details table and
click the Next button.
9. In the Edit Relationship dialog box, InfoPath has already detected the
relationship between the Orders table and the Order Details table because
there is a field named OrderID in both tables. Click the Finish button.
10. In the Data Source Setup Wizard dialog box, click the Edit SQL& button.

11. In the Edit SQL dialog box, examine the ADO Shape query InfoPath uses
to find data in the Orders and Order Details tables. Click the OK button.
12. In the Data Source Setup Wizard dialog box, click the Next button, and
then the Finish button. InfoPath creates a new form based on the Orders
and Order Details tables.
13. Save the new form as "NorthwindOrderQuery.xsn".

Exercise 2 Designing the Data Entry View
In this exercise, you will design the Data Entry view of the
NorthwindOrderQuery form.

1. In the Controls task pane, click Views to switch to the Views task pane.
2. In the Views task pane, click the Data Entry view.
3. In the Views task pane, click Data Source to switch to the Data Source
task pane.
4. Expand the dataFields tree in the Data Source task pane.
5. Drag the d:Orders group from the Data Source task pane onto the form
area. From the context menu listing the available controls for the
d:Orders group, select Repeating Section with Controls.
6. Lay out the controls in the form area in any way that suits you. Figure
6 contains an example layout you can follow.
7. Save the changes you made to the form.

Test the Form
1. Click the Preview Form button on the Standard toolbar.
2. On the View menu, click Query.
3. In the OrderID control, type "11068" and click the Run Query button.
Examine the data returned from the query.
4. On the View menu, click Query.
5. Clear the OrderID control.
6. In the CustomerID control, type "ALFKI" and click the Run Query button.
Examine the data returned from the query.
7. Try other query parameters. When you have finished, click the Close
Preview button on the Standard toolbar.

Exercise 3 Designing the Query View
In this exercise, you will design the Query view of the NorthwindOrderQuery
form.

1. On the View menu, click Manage Views& to bring up the Views task pane.
2. On the Views task pane, click Query.
3. Click Select All on the Edit menu to select all of the controls and text
in the form area.
4. Click Cut on the Edit menu to delete all of the elements.
5. In the Data Source task pane, expand the queryFields tree, and then
expand the q:Orders tree.
6. Drag the OrderID field from the Data Source task pane onto the form area.
7. In the Data Source task pane, click Controls to switch to the Controls
task pane.
8. From the Controls task pane, drag a Button control onto the form.
9. Right-click on the Button control and click Button Properties&.
10. In the Action drop-down list box of the Button Properties dialog box,
select Run Query and then click OK.
11. Drag another Button control from the Controls task pane onto the form
next to the Run Query button.
12. Right-click on the Button control and click Button Properties&.
13. In the Action drop-down list box of the Button Properties dialog box,
select New Record and then click OK.
14. Lay out the controls on the form in any way you see fit. Figure 7
includes an example layout.
15. Save the changes you made to the form.

------------------------------------------------------
How to point to an Access File rather than SQL changes

Inside the .xsf file you will likely find an <xsf:query> element.
Inside that is an <xsf:adoAdapter> element which includes information
about the data source.

You will likely see something like the following (the
<xsf:adoAdapter>element is on a single horribly long line in the
original code but my newsreader breaks the line):

<xsf:query>
<xsf:adoAdapter
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password="";User
ID=Admin;Data Source=C:\Program Files\Microsoft
Office\OFFICE11\SAMPLES\INFOPATH\INFNWIND.MDB;Mode=Share Deny
None;Extended Properties="";Jet OLEDB:System
database="";Jet OLEDB:Registry Path="";Jet
OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet
OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet
OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database
Password="";Jet OLEDB:Create System Database=False;Jet
OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on
Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet
OLEDB:SFP=False" commandText="select
[CustomerID],[CompanyName],[ContactName],[ContactTitle] from
[Customers] as [Customers]" queryAllowed="yes"
submitAllowed="yes"></xsf:adoAdapter>
</xsf:query>

Edit the information about the Data Source in the connection string.

Be careful not to end up with a split line for the <xsf:adoAdapter>
element in your code after editing, since that may cause errors.

Republish the form.


Gustav Brock wrote:

>Hi all
>
>Anyone familiar with these new products and if they somehow relate to
>Access?
>
>I've tried to browse some brochures but they are so hyped that it is
>just plain impossible to figure out wether these apps are fancy toys
>which will bring any machine to a crawl or if they could be useful
>tools in cooperation with Access and database applications.
>
>And how are the programmed if you wish to create custom build apps?
>I've located this link to a SDK related to InfoPath:
>
>http://www.microsoft.com/downloads/details.aspx?familyid=351f0616-93aa-4fe8-9238-d702f1bfbab4&displaylang=en
>
>but it looks like you need to take a deep breath and have a weekend
>set aside.
>
>Also, how much are they relying on specific MS server software like
>SharePoint or Exchange or pure MS environments or Office 2003 only? If
>so, the usefulness is very limited as our clients use a variety of
>systems. 
>
>/gustav
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada





More information about the AccessD mailing list