M
mdsmitty
I have a form that is querying a data source by using an account number and
the problem I have is that data is appearing in the data fields without an
account number (the 1st entry in the data source is what is populating the
data fields before an account number is entered). Once I add an account
number to the field manually and tab out/leave the field the data fields
update. The following is how I created the form.
1. Created a form with a data source.
2. Went through the data connection wizard, selected the tables to be used,
and began designing the form.
3. The design defaults with a Title table, New Record Button, and Query
Button.
4. I deleted the two buttons because I am going to populate the fields
automatically based on what is in the Account_Number field. This field will
be populated programmatically in the .xml file before it is loaded.
5. Created a query On Load Event to query the data source based on the
Account_Number field.
6. Added a Rule - Condition: Account_Number is Present - Action: Query
using a data connection: Main connection. In the Account_Number Properties
dialog.
The way I want the form to work is to have the account number populate
before the form loads, then upon loading the form the query will run
automatically. If there is no account number in the Account_Number field
then no data should be populated in the "data fields". The bottom line is -
If there is no Account Number then there should be no information in the data
fields. When I enter an account number either manually or progammatically
then data should be queried and populate the data fields.
Thanks in advance
Mike
the problem I have is that data is appearing in the data fields without an
account number (the 1st entry in the data source is what is populating the
data fields before an account number is entered). Once I add an account
number to the field manually and tab out/leave the field the data fields
update. The following is how I created the form.
1. Created a form with a data source.
2. Went through the data connection wizard, selected the tables to be used,
and began designing the form.
3. The design defaults with a Title table, New Record Button, and Query
Button.
4. I deleted the two buttons because I am going to populate the fields
automatically based on what is in the Account_Number field. This field will
be populated programmatically in the .xml file before it is loaded.
5. Created a query On Load Event to query the data source based on the
Account_Number field.
6. Added a Rule - Condition: Account_Number is Present - Action: Query
using a data connection: Main connection. In the Account_Number Properties
dialog.
The way I want the form to work is to have the account number populate
before the form loads, then upon loading the form the query will run
automatically. If there is no account number in the Account_Number field
then no data should be populated in the "data fields". The bottom line is -
If there is no Account Number then there should be no information in the data
fields. When I enter an account number either manually or progammatically
then data should be queried and populate the data fields.
Thanks in advance
Mike