shabbaranks
Registered User.
- Local time
- Today, 22:48
- Joined
- Oct 17, 2011
- Messages
- 300
Hi all,
Im trying to output to a textbox the result of a dsum, also Im wondering if this is possible to have some sort of dynamic control so a user changes the selection in the combo box and the date ranges in the "From" and "To" dates and the result is updated based on this.
My current code is
But Im not sure firstly how to output this to a textbox on the same form which is called TotalHoursAdmin_TXTBox
Or how to make the textbox update dynamically if the combo and date ranges change on this form?
Help is appreciated as always
Im trying to output to a textbox the result of a dsum, also Im wondering if this is possible to have some sort of dynamic control so a user changes the selection in the combo box and the date ranges in the "From" and "To" dates and the result is updated based on this.
My current code is
Code:
DLookup (DSum("sHours", "TimesheetTable", "sUser = '" & Forms!SubmittedTimesheet_frm!AdminSelect_Combo.Value _
& " AND [Task Date] between '" & Forms!SubmittedTimesheet_frm!FromDateAdmin_TXTBox & "'" _
& " AND '" & Forms!SubmittedTimesheet_frm!ToDateAdmin_TXTBox & "'"))
But Im not sure firstly how to output this to a textbox on the same form which is called TotalHoursAdmin_TXTBox
Or how to make the textbox update dynamically if the combo and date ranges change on this form?
Help is appreciated as always