asplus2012
Programmer
Hi,
I copied a form with a combo-box into a new form. I have modified the row source to return only certain information by using the WHERE clause in my SQL Statement.
When my new form is displayed, my combo-box is empty. If I click on it, it shows me the entries that match my selection criteria on the second and subsequent lines. I can then choose one of them or click again on the empty combo-box first line (which is blank). The result will be either my chosen line or the blank line. As soon as I select a non-blank entry, the blank line is not present in any further selections (which is OK).
I have another set of fields that control the date range. This is initialized in the open event of the form. If I change the start date and focus out of the start date field by clicking elsewhere, the record source of the form is refreshed but it is using my blank entry in my combo-box and this returns all data that matches the date range.
On my original form (with no WHERE clause in the row source of the combo-box) the combo-box appears with a valid record from the feeding table already shown.
My question are: When is the combo-box initialized from the row source query that it contains? Why is there a different behavior when I do not use the WHERE clause in the SQL statement?
Thank you in advance to anyone who can help me with this.
Bernard Le Jour
AS Plus Informatique Inc.
I copied a form with a combo-box into a new form. I have modified the row source to return only certain information by using the WHERE clause in my SQL Statement.
When my new form is displayed, my combo-box is empty. If I click on it, it shows me the entries that match my selection criteria on the second and subsequent lines. I can then choose one of them or click again on the empty combo-box first line (which is blank). The result will be either my chosen line or the blank line. As soon as I select a non-blank entry, the blank line is not present in any further selections (which is OK).
I have another set of fields that control the date range. This is initialized in the open event of the form. If I change the start date and focus out of the start date field by clicking elsewhere, the record source of the form is refreshed but it is using my blank entry in my combo-box and this returns all data that matches the date range.
On my original form (with no WHERE clause in the row source of the combo-box) the combo-box appears with a valid record from the feeding table already shown.
My question are: When is the combo-box initialized from the row source query that it contains? Why is there a different behavior when I do not use the WHERE clause in the SQL statement?
Thank you in advance to anyone who can help me with this.
Bernard Le Jour
AS Plus Informatique Inc.