Hi all,
I have a child and parent forms. The record source of the sub-form is query containing aggregate functions.
A combo box in the parent form filters the sub-form results based on value (name) selected.
Some values of the sub-form are accessed and displayed on the main form; A calculation is done (using values of the sub form)and final result is displayed on main form.
When clicked on a button on the main form the result is inserted into a temp table to replace an existing value. (The sub-form 's recordsource, I mentioned earlier is a query based on this temp table)
So basically after new calculated value is inserted into
the table the current calculated values on main form would change obviously when sub-form is refreshed.
Problem:
That is not happening. (Value not updated on form when requeried)
I tried
Replacing line 10 & 11 with this does not work as well:
It only works (value is updated)when I select the same value using the combobox.
E.I After update event of combo box fires but nothing of above seem to work.
Hope I am contextualizing .
Someone with a better idea can help me out
I have a child and parent forms. The record source of the sub-form is query containing aggregate functions.
A combo box in the parent form filters the sub-form results based on value (name) selected.
Some values of the sub-form are accessed and displayed on the main form; A calculation is done (using values of the sub form)and final result is displayed on main form.
When clicked on a button on the main form the result is inserted into a temp table to replace an existing value. (The sub-form 's recordsource, I mentioned earlier is a query based on this temp table)
So basically after new calculated value is inserted into
the table the current calculated values on main form would change obviously when sub-form is refreshed.
Problem:
That is not happening. (Value not updated on form when requeried)
I tried
Code:
If rs!EmployeeId = Me.EmployeeId And rs!DateWorked = Me!txtdate Then
rs.Edit
rs!Reset_Value = Me.[B]txtfinalcredit[/B]'[I]inserting calculated value[/I]
rs.Update
End If
MsgBox "Credit reseted Successfully", vbOKOnly + vbInformation, "Sucessful"
[B]DoCmd.Requery "mysubform"[/B][I]'requery subform[/I]
[B]Me.Requery[/B][I]'requery all controls[/I]
Code:
[B]Me.Refresh [/B]
E.I After update event of combo box fires but nothing of above seem to work.
Hope I am contextualizing .
Someone with a better idea can help me out
Comment