1*b1cdbd2cSJim Jagielski<?xml version="1.0" encoding="UTF-8"?>
2*b1cdbd2cSJim Jagielski
3*b1cdbd2cSJim Jagielski
4*b1cdbd2cSJim Jagielski
5*b1cdbd2cSJim Jagielski<!--***********************************************************
6*b1cdbd2cSJim Jagielski *
7*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
8*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
9*b1cdbd2cSJim Jagielski * distributed with this work for additional information
10*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
11*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
12*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
13*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
14*b1cdbd2cSJim Jagielski *
15*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
16*b1cdbd2cSJim Jagielski *
17*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
18*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
19*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
21*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
22*b1cdbd2cSJim Jagielski * under the License.
23*b1cdbd2cSJim Jagielski *
24*b1cdbd2cSJim Jagielski ***********************************************************-->
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski
28*b1cdbd2cSJim Jagielski
29*b1cdbd2cSJim Jagielski		<helpdocument version="1.0">
30*b1cdbd2cSJim Jagielski<meta>
31*b1cdbd2cSJim Jagielski<topic id="textshared0201170203xml" indexer="include" status="PUBLISH">
32*b1cdbd2cSJim Jagielski<title id="tit" xml-lang="en-US">Data</title>
33*b1cdbd2cSJim Jagielski<filename>/text/shared/02/01170203.xhp</filename>
34*b1cdbd2cSJim Jagielski</topic>
35*b1cdbd2cSJim Jagielski</meta>
36*b1cdbd2cSJim Jagielski<body>
37*b1cdbd2cSJim Jagielski<section id="daten">
38*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="index" id="bm_id3150040"><bookmark_value>forms; data</bookmark_value>
39*b1cdbd2cSJim Jagielski<bookmark_value>data; forms and subforms</bookmark_value>
40*b1cdbd2cSJim Jagielski<bookmark_value>forms; subforms</bookmark_value>
41*b1cdbd2cSJim Jagielski<bookmark_value>subforms; description</bookmark_value>
42*b1cdbd2cSJim Jagielski</bookmark>
43*b1cdbd2cSJim Jagielski<paragraph role="heading" id="hd_id3150040" xml-lang="en-US" level="1" l10n="U" oldref="1"><link href="text/shared/02/01170203.xhp" name="Data">Data</link></paragraph>
44*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3147242" xml-lang="en-US" l10n="U" oldref="2">The<emph> Data </emph>tab page defines the form properties that refer to the database that is linked to the form.</paragraph>
45*b1cdbd2cSJim Jagielski</section>
46*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3149398" xml-lang="en-US" l10n="U" oldref="107">Defines the data source on which the form is based, or specifies whether the data can be edited by the user. Apart from the sort and filter functions, you will also find all the necessary properties to create a <link href="text/shared/02/01170203.xhp" name="subform">subform</link>.</paragraph>
47*b1cdbd2cSJim Jagielski<section id="howtoget">
48*b1cdbd2cSJim Jagielski  <embed href="text/shared/00/00040501.xhp#formulareigenschaftendaten"/>
49*b1cdbd2cSJim Jagielski</section>
50*b1cdbd2cSJim Jagielski<sort>
51*b1cdbd2cSJim Jagielski<section id="Section1">
52*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_DATASOURCE" id="bm_id3153146" localize="false"/><paragraph role="heading" id="hd_id3154810" xml-lang="en-US" level="2" l10n="CHG" oldref="5">Data source<comment>UFI: was Database</comment></paragraph>
53*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3152349" xml-lang="en-US" l10n="CHG" oldref="16"><ahelp hid="HID_PROP_DATASOURCE">Defines the data source to which the form should refer.</ahelp> If you click the <emph>...</emph> button, you call the <link href="text/shared/01/01020000.xhp" name="Open"><emph>Open</emph></link> dialog, where you can choose a data source.</paragraph>
54*b1cdbd2cSJim Jagielski</section>
55*b1cdbd2cSJim Jagielski<section id="Section2">
56*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_CURSORSOURCE" id="bm_id3150275" localize="false"/><paragraph role="heading" id="hd_id3146948" xml-lang="en-US" level="2" l10n="CHG" oldref="6">Content<comment>UFI: was Data source</comment></paragraph>
57*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3155922" xml-lang="en-US" l10n="CHG" oldref="17"><ahelp hid="HID_PROP_CURSORSOURCE">Determines the content to be used for the form. The content can be an existing table or a query (previously created in the database), or it can be defined by an SQL-statement. Before you enter a content you have to define the exact type in <emph>Content type</emph>.</ahelp></paragraph>
58*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3149657" xml-lang="en-US" l10n="CHG" oldref="27">If you have selected either "Table" or "Query" in <emph>Content type</emph>, the box lists all the tables and queries set up in the selected database.</paragraph>
59*b1cdbd2cSJim Jagielski</section>
60*b1cdbd2cSJim Jagielski<section id="Section3">
61*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_CURSORSOURCETYPE" id="bm_id3153381" localize="false"/><paragraph role="heading" id="hd_id3148755" xml-lang="en-US" level="2" l10n="U" oldref="7">Content type</paragraph>
62*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3150541" xml-lang="en-US" l10n="U" oldref="19"><ahelp hid="HID_PROP_CURSORSOURCETYPE">Defines whether the data source is to be an existing database table or query, or if the form is to be generated based on an SQL statement.</ahelp></paragraph>
63*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3153192" xml-lang="en-US" l10n="CHG" oldref="29">If you choose "Table" or "Query", the form will refer to the table or query that you specify under <emph>Content</emph>. If you want to create a new query or a <link href="text/shared/02/01170203.xhp" name="subform">subform</link>, then you have to choose the "SQL" option. You can then enter the statement for the SQL query or the subform directly in the <emph>List content</emph> box on the Control properties Data tab page.</paragraph>
64*b1cdbd2cSJim Jagielski</section>
65*b1cdbd2cSJim Jagielski<section id="Section4">
66*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_ESCAPE_PROCESSING" id="bm_id3144433" localize="false"/><paragraph role="heading" id="hd_id3158409" xml-lang="en-US" level="2" l10n="U" oldref="105">Analyze SQL command</paragraph>
67*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3145171" xml-lang="en-US" l10n="CHG" oldref="106"><ahelp hid="HID_PROP_ESCAPE_PROCESSING">Specifies whether the SQL statement is to be analyzed by %PRODUCTNAME.</ahelp> If set to Yes, you can click the <emph>...</emph> button next to the <emph>Content</emph> list box. This will open a window where you can graphically create a database query. When you close that window, the SQL statement for the created query will be inserted in the <emph>Content</emph> list box.</paragraph>
68*b1cdbd2cSJim Jagielski</section>
69*b1cdbd2cSJim Jagielski<section id="Section5">
70*b1cdbd2cSJim Jagielski<!-- removed HID HID_PROP_FILTER_CRITERIA --><paragraph role="heading" id="hd_id3154684" xml-lang="en-US" level="2" l10n="U" oldref="81">Filter</paragraph>
71*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3150449" xml-lang="en-US" l10n="CHG" oldref="82"><ahelp hid="HID_PROP_FILTER_CRITERIA">Enter the required conditions for filtering the data in the form. The filter specifications follow SQL rules without using the WHERE clause.</ahelp> For example, if you want to display all records with the "Mike" forename, type into the data field: Forename = 'Mike'. You can also combine conditions: Forename = 'Mike' OR Forename = 'Peter'. All records matching either of these two conditions will be displayed.</paragraph>
72*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3156212" xml-lang="en-US" l10n="CHG" oldref="83">The filter function is available in user mode through the <link href="text/shared/02/12030000.xhp" name="AutoFilter"><emph>AutoFilter</emph></link> and <link href="text/shared/02/12090000.xhp" name="Default Filter"><emph>Default Filter</emph></link> icons on the <link href="text/shared/main0213.xhp" name="Form Navigation Bar"><emph>Form Navigation</emph> Bar</link>.</paragraph>
73*b1cdbd2cSJim Jagielski</section>
74*b1cdbd2cSJim Jagielski<section id="Section6">
75*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_SORT_CRITERIA" id="bm_id3151353" localize="false"/><paragraph role="heading" id="hd_id3156005" xml-lang="en-US" level="2" l10n="U" oldref="84">Sort</paragraph>
76*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3163712" xml-lang="en-US" l10n="U" oldref="85"><ahelp hid="HID_PROP_SORT_CRITERIA">Specifies the conditions to sort the data in the form. The specification of the sorting conditions follows SQL rules without the use of the ORDER BY clause.</ahelp> For example, if you want all records of a database to be sorted in one field in an ascending order and in another field in a descending order, enter Forename ASC, Name DESC (presuming Forename and Name are the names of the data fields).</paragraph>
77*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3156444" xml-lang="en-US" l10n="CHG" oldref="86">The appropriate icons on the <link href="text/shared/main0213.xhp" name="Form Navigation Bar"><emph>Form Navigation</emph> Bar</link> can be used in User mode to sort: <link href="text/shared/02/12010000.xhp" name="Sort Ascending"><emph>Sort Ascending</emph></link>, <link href="text/shared/02/12020000.xhp" name="Sort Descending"><emph>Sort Descending</emph></link>, <link href="text/shared/02/12100100.xhp" name="Sort"><emph>Sort</emph></link>.</paragraph>
78*b1cdbd2cSJim Jagielski</section>
79*b1cdbd2cSJim Jagielski<section id="Section7">
80*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_DATAENTRY" id="bm_id3154129" localize="false"/><paragraph role="heading" id="hd_id3148616" xml-lang="en-US" level="2" l10n="U" oldref="8">Add data only</paragraph>
81*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3153139" xml-lang="en-US" l10n="U" oldref="20"><ahelp hid="HID_PROP_DATAENTRY">Determines if the form only allows the addition of new data (Yes) or if it allows other properties as well (No).</ahelp></paragraph>
82*b1cdbd2cSJim Jagielski<paragraph role="note" id="par_id3148575" xml-lang="en-US" l10n="U" oldref="21">If <emph>Add data only</emph> is set to "Yes", changing or deleting data is not possible.</paragraph>
83*b1cdbd2cSJim Jagielski</section>
84*b1cdbd2cSJim Jagielski<section id="Section8">
85*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_NAVIGATION" id="bm_id3155418" localize="false"/><paragraph role="heading" id="hd_id3148455" xml-lang="en-US" level="2" l10n="U" oldref="9">Navigation bar</paragraph>
86*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3157976" xml-lang="en-US" l10n="U" oldref="22"><ahelp hid="HID_PROP_NAVIGATION">Specifies whether the navigation functions in the lower form bar can be used.</ahelp></paragraph>
87*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3149485" xml-lang="en-US" l10n="U" oldref="79">The "Parent Form" option is used for subforms. If you choose this option for a subform, you can navigate using the records of the main form if the cursor is placed in the subform. A subform is linked to the parent form by a 1:1 relationship, so navigation is always performed in the parent form.</paragraph>
88*b1cdbd2cSJim Jagielski</section>
89*b1cdbd2cSJim Jagielski<section id="Section9">
90*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_CYCLE" id="bm_id3151282" localize="false"/><paragraph role="heading" id="hd_id3151051" xml-lang="en-US" level="2" l10n="U" oldref="10">Cycle</paragraph>
91*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3154944" xml-lang="en-US" l10n="U" oldref="23"><ahelp hid="HID_PROP_CYCLE">Determines how the navigation should be done using the tab key.</ahelp> Using the tab key, you can move forward in the form. If you simultaneously press the Shift key, the navigation will follow the opposite direction. If you reach the last (or the first) field and press the tab key again, it can have various effects. Define the key control with the following options:</paragraph>
92*b1cdbd2cSJim Jagielski<table id="tbl_id3150658">
93*b1cdbd2cSJim Jagielski<tablerow>
94*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
95*b1cdbd2cSJim Jagielski<paragraph role="tablehead" id="par_id3166413" xml-lang="en-US" l10n="U" oldref="87">Option</paragraph>
96*b1cdbd2cSJim Jagielski</tablecell>
97*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
98*b1cdbd2cSJim Jagielski<paragraph role="tablehead" id="par_id3150424" xml-lang="en-US" l10n="U" oldref="88">Meaning</paragraph>
99*b1cdbd2cSJim Jagielski</tablecell>
100*b1cdbd2cSJim Jagielski</tablerow>
101*b1cdbd2cSJim Jagielski<tablerow>
102*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
103*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3150417" xml-lang="en-US" l10n="U" oldref="89">Default</paragraph>
104*b1cdbd2cSJim Jagielski</tablecell>
105*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
106*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3157847" xml-lang="en-US" l10n="U" oldref="90">This setting automatically defines a cycle which follows an existing database link: If the form contains a database link, the Tab key will, by default, initiate a change to the next or previous record on exit from the last field (see All Records). If there is no database link the next/previous form is shown (see Current Page).</paragraph>
107*b1cdbd2cSJim Jagielski</tablecell>
108*b1cdbd2cSJim Jagielski</tablerow>
109*b1cdbd2cSJim Jagielski<tablerow>
110*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
111*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3153418" xml-lang="en-US" l10n="U" oldref="91">All records</paragraph>
112*b1cdbd2cSJim Jagielski</tablecell>
113*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
114*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3152972" xml-lang="en-US" l10n="U" oldref="92">This option applies to database forms only and is used to navigate through all records. If you use the Tab key to exit from the last field of a form, the current record is changed.</paragraph>
115*b1cdbd2cSJim Jagielski</tablecell>
116*b1cdbd2cSJim Jagielski</tablerow>
117*b1cdbd2cSJim Jagielski<tablerow>
118*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
119*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3151020" xml-lang="en-US" l10n="U" oldref="93">Active record</paragraph>
120*b1cdbd2cSJim Jagielski</tablecell>
121*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
122*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3145301" xml-lang="en-US" l10n="U" oldref="94">This option applies to database forms only, and is used to navigate within the current record. If you use the Tab key to exit from the last field of a form, the current record is changed.</paragraph>
123*b1cdbd2cSJim Jagielski</tablecell>
124*b1cdbd2cSJim Jagielski</tablerow>
125*b1cdbd2cSJim Jagielski<tablerow>
126*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
127*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3146913" xml-lang="en-US" l10n="U" oldref="95">Current page</paragraph>
128*b1cdbd2cSJim Jagielski</tablecell>
129*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
130*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3150330" xml-lang="en-US" l10n="U" oldref="96">On exit from the last field of a form, the cursor skips to the first field in the next form. This is standard for HTML forms; therefore, this option is especially relevant for HTML forms.</paragraph>
131*b1cdbd2cSJim Jagielski</tablecell>
132*b1cdbd2cSJim Jagielski</tablerow>
133*b1cdbd2cSJim Jagielski</table>
134*b1cdbd2cSJim Jagielski</section>
135*b1cdbd2cSJim Jagielski<section id="Section10">
136*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_ALLOW_ADDITIONS" id="bm_id3155445" localize="false"/><paragraph role="heading" id="hd_id3155064" xml-lang="en-US" level="2" l10n="U" oldref="11">Allow additions</paragraph>
137*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3154360" xml-lang="en-US" l10n="U" oldref="24"><ahelp hid="HID_PROP_ALLOW_ADDITIONS">Determines if data can be added.</ahelp></paragraph>
138*b1cdbd2cSJim Jagielski</section>
139*b1cdbd2cSJim Jagielski<section id="Section11">
140*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_ALLOW_EDITS" id="bm_id3083286" localize="false"/><paragraph role="heading" id="hd_id3156054" xml-lang="en-US" level="2" l10n="U" oldref="12">Allow modifications</paragraph>
141*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3156377" xml-lang="en-US" l10n="U" oldref="25"><ahelp hid="HID_PROP_ALLOW_EDITS"> Determines if the data can be modified.</ahelp></paragraph>
142*b1cdbd2cSJim Jagielski</section>
143*b1cdbd2cSJim Jagielski<section id="Section12">
144*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_ALLOW_DELETIONS" id="bm_id3153924" localize="false"/><paragraph role="heading" id="hd_id3149019" xml-lang="en-US" level="2" l10n="CHG" oldref="13">Allow deletions</paragraph>
145*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3148995" xml-lang="en-US" l10n="U" oldref="26"><ahelp hid="HID_PROP_ALLOW_DELETIONS">Determines if the data can be deleted.</ahelp></paragraph>
146*b1cdbd2cSJim Jagielski</section>
147*b1cdbd2cSJim Jagielski<section id="Section13">
148*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_MASTERFIELDS" id="bm_id3147097" localize="false"/><paragraph role="heading" id="hd_id3153714" xml-lang="en-US" level="2" l10n="U" oldref="3">Link master fields</paragraph>
149*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3147339" xml-lang="en-US" l10n="CHG" oldref="14"><ahelp hid="HID_PROP_MASTERFIELDS">If you create a <link href="text/shared/02/01170203.xhp" name="subform">subform</link>, enter the data field of the parent form responsible for the synchronization between parent and subform.</ahelp> To enter multiple values, press Shift + Enter after each input line.<comment>UFI: fixes #i22439#</comment></paragraph>
150*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3149568" xml-lang="en-US" l10n="CHG" oldref="71">The subform is based on an <link href="text/shared/00/00000005.xhp#sql" name="SQL">SQL</link> query; more specifically, on a <link href="text/shared/explorer/database/02010100.xhp" name="Parameter Query">Parameter Query</link>. If a field name is entered in the <emph>Link master fields</emph> box, the data contained in that field in the main form is read to a variable that you must enter in <emph>Link slave fields</emph>. In an appropriate SQL statement, this variable is compared to the table data that the subform refers to. Alternatively, you can enter the column name in the <emph>Link master fields</emph> box.</paragraph>
151*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3156089" xml-lang="en-US" l10n="U" oldref="72">Consider the following example:</paragraph>
152*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3151017" xml-lang="en-US" l10n="U" oldref="30">The database table on which the form is based is, for example, a customer database ("Customer"), where every customer has been given a unique number in a data field named "Cust_ID". A customer's orders are maintained in another database table. You now want to see each customer's orders after entering them into the form. In order to do this you should create a subform. Under <emph>Link master fields</emph> enter the data field from the customer database which clearly identifies the customer, that is, Cust_ID. Under <emph>Link slave fields</emph> enter the name of a variable which is to accept the data of the field Cust_ID, for example, x.</paragraph>
153*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3151248" xml-lang="en-US" l10n="U" oldref="73">The subform should show the appropriate data from the orders table ("Orders") for each customer ID (Customer_ID -&gt; x). This is only possible if each order is uniquely assigned to one customer in the orders table. Alternatively, you can use another field called Customer_ID; however, to make sure that this field is not confused with the same field from the main form, the field is called Customer_Number.</paragraph>
154*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3153537" xml-lang="en-US" l10n="U" oldref="74">Now compare the Customer_Number in the "Orders" table with the Customer_ID from the "Customers" table, which can be done, for example, using the x variable with the following SQL statement:</paragraph>
155*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3155335" xml-lang="en-US" l10n="U" oldref="75">SELECT * FROM Orders WHERE Customer_Number =: x (if you want the subform to show all data from the orders table)</paragraph>
156*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3163727" xml-lang="en-US" l10n="U" oldref="76">or:</paragraph>
157*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3153921" xml-lang="en-US" l10n="U" oldref="77">SELECT Item FROM Orders WHERE Customer_Number =: x (if you want the subform from the orders table to show only the data contained in the "Item" field)</paragraph>
158*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3148488" xml-lang="en-US" l10n="U" oldref="78">The SQL statement can either be entered in the <emph>Data source</emph> field, or you can create an appropriate parameter query, which can be used to create the subform.</paragraph>
159*b1cdbd2cSJim Jagielski</section>
160*b1cdbd2cSJim Jagielski<section id="Section14">
161*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="hid/EXTENSIONS_HID_PROP_SLAVEFIELDS" id="bm_id3145789" localize="false"/><paragraph role="heading" id="hd_id3150648" xml-lang="en-US" level="2" l10n="U" oldref="4">Link slave fields</paragraph>
162*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3149923" xml-lang="en-US" l10n="CHG" oldref="15"><ahelp hid="HID_PROP_SLAVEFIELDS">If you create a subform, enter the variable where possible values from the parent form field can be stored.</ahelp> If a subform is based on a query, enter the variable that you defined in the query. If you create a form using an SQL statement entered in the <emph>Data source</emph> field, enter the variable you used in the statement. You can choose any variable name. If you want to enter multiple values, press Shift + Enter.</paragraph>
163*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3155114" xml-lang="en-US" l10n="U" oldref="31">If, for example, you specified the Customer_ID database field as a parent field under <emph>Link master fields</emph>, then you can define under <emph>Link slave fields</emph> the name of the variable in which the values of the Customer_ID database field are to be stored. If you now specify an SQL statement in the <emph>Data source</emph> box using this variable, the relevant values are displayed in the subform.</paragraph>
164*b1cdbd2cSJim Jagielski</section>
165*b1cdbd2cSJim Jagielski</sort>
166*b1cdbd2cSJim Jagielski<paragraph role="heading" id="hd_id3152778" xml-lang="en-US" level="2" l10n="U" oldref="32">What is a subform?</paragraph>
167*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3155579" xml-lang="en-US" l10n="U" oldref="33">Forms are created based on a database table or database query. They display the data in a visually pleasant fashion and can be used to enter data or edit data.</paragraph>
168*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3147094" xml-lang="en-US" l10n="U" oldref="34"><variable id="wozu">If you require a form that can refer to the data in a table or query and can additionally display data from another table, you should create a subform.
169*b1cdbd2cSJim Jagielski</variable> For example, this subform can be a text box that displays the data of another database table.</paragraph>
170*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3157972" xml-lang="en-US" l10n="U" oldref="35">A subform is an additional component of the main form. The main form can be called the "parent form" or "master". Subforms are needed as soon as you want to access more than one table from a form. Each additional table requires its own subform.</paragraph>
171*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id4807275" xml-lang="en-US" l10n="NEW">After creating a form, it can be changed into a subform. To do this, enter Design Mode, and open the Form Navigator. In the Form Navigator, drag a form (that will become a subform) onto any other form (that will become a master).</paragraph>
172*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3158444" xml-lang="en-US" l10n="CHG" oldref="36">The user of your document will not see that a form has subforms. The user only sees a document in which data is entered or where existing data is displayed.</paragraph>
173*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_idN10C2A" xml-lang="en-US" l10n="NEW">Specify the Link master field from the data fields in the master form. In the subform, the Link slave field can be set as a field which will be matched to the contents of the Link master field.</paragraph>
174*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_idN10C2D" xml-lang="en-US" l10n="NEW">When the user navigates through the data, the form always displays the current data record. If there are subforms defined, the contents of the subforms will be displayed after a short delay of approximate 200 ms. This delay enables you to quickly browse through the data records of the master form. If you navigate to the next master data record within the delay limit, the subform data need not be retrieved and displayed.</paragraph>
175*b1cdbd2cSJim Jagielski</body>
176*b1cdbd2cSJim Jagielski</helpdocument>
177