I have a continuous subform within a single form. On click of a button on the single form, procedures run which:
i. Bring data into controls on the single form from three tables via ADO (refresh the screen view)
ii. Evaluate that data (various if statements)
iii. Depending on the output of (ii), runs a procedure which inserts data using ADO in a new record in the table behind the continuous form and re-sets the recordsource of the subform:
This works fine and I see the new record in the subform as long as there is already a record displayed.
However, if it's the first record for the specified date, the subform does not refresh properly.
It is not until i click the button again and insert another record that i see the previously entered record (ie I either see 0 records or 2 or more 2 - never just 1)
If I run the refresh procedure on its own (i) immediately after entering the new record, i sometimes get the updated view in the subform and other times i have to run it twice before i see the record.
This problem persists:
- If Allow Additions is set to Yes or No on the subform
- If there no records or at all in table or if there are no records matching the recordsource criteria of the subform
Is this normal behaviour.......?
As ever, many thanks in advance
i. Bring data into controls on the single form from three tables via ADO (refresh the screen view)
ii. Evaluate that data (various if statements)
iii. Depending on the output of (ii), runs a procedure which inserts data using ADO in a new record in the table behind the continuous form and re-sets the recordsource of the subform:
Code:
Forms.frmBookView!Child749.Form.RecordSource = "SELECT tblDays.*, tblUsers.* FROM tblDays INNER JOIN tblUsers ON tblDays.StaffID = tblUsers.StaffID WHERE tblDays.HolDate = " & MakeUSDate(Forms.frmBookView.Combo487.Value)
This works fine and I see the new record in the subform as long as there is already a record displayed.
However, if it's the first record for the specified date, the subform does not refresh properly.
It is not until i click the button again and insert another record that i see the previously entered record (ie I either see 0 records or 2 or more 2 - never just 1)
If I run the refresh procedure on its own (i) immediately after entering the new record, i sometimes get the updated view in the subform and other times i have to run it twice before i see the record.
This problem persists:
- If Allow Additions is set to Yes or No on the subform
- If there no records or at all in table or if there are no records matching the recordsource criteria of the subform
Is this normal behaviour.......?
As ever, many thanks in advance