Updating listbox using a thread in
Now we’re ready to create our Background Worker object. Updating Form Controls In the Progress Changed event, we get to process our values from our Do Work method.Notice that we tell it that we want to have it report progress and support cancellation. Here’s the code: In this routine, the progress bar and the listbox are updated with values from the worker thread.
i do get the idea of temp tables and what not, but what i want to know is if i can get a snippet or sample for a mysql update using the records on the listbox? To update a table from a List Box/Combo Box is not a direct task. Date Initiated FROM TBLLOAN INNER JOIN Tbl Refinance ON TBLLOAN.
Just with a sql you have the ability to filter/manipulate the records.
Your choice of using a Temp Table should be for some other reason then to supply records to a form Control.
Close Set rs = Nothing On Error Go To 0 Exit Function fnc Late Fees To Be Charged_Error: Msg Box "Error " & Err.
Close Set rst = Nothing End If Commence Date = Commence Date 14 'Add 14 Days to get Next loop Repay Count = Repay Count 1 'Add 1 to Repay Count variable for next loop Late Fee Due = Late Fee Due Late Fee Now 'Add this fortnights Late Fee Charge to Accummulated Late Fees Variable Repay Prev = Repay Total 'Reset Repay Prev to New Balance If Commence Date Date - 7 Then Exit Do End If Loop Commence Date = Date 'Set Commence Date to be Today to check for all Late Fees charged Late Fees Charged = fnc Late Fees To Date(Loan ID, Commence Date) 'Refresh Late Fees Charged as at Today's date Late Fee Due = Late Fee Due - Late Fees Charged 'Deduct any Late Fees already Charged fnc Late Fees To Be Charged = Late Fee Due 'Return Result to Function Else Msg Box "Loan Repayments Not Fortnightly - Calculate Late Fees Some Other Way" 'Calculator won't work for Weekly or Monthly repayments End If rs.
Search for updating listbox using a thread in:
Remember that the User State value is an object and will require conversion if you can’t use an object type.