Does this help?
Private Sub cmdApply_Click()
On Error GoTo ErrHandler
Dim db As Database
Dim qdf As QueryDef
Dim strQryAdd As String, strQryUpdate As String
strQryAdd = "qryASharedCommission"
strQryUpdate = "qryUSharedCommission"
SetStatusBar ("Adding Commissions ....")
Set db = CurrentDb()
Set qdf = db.QueryDefs(strQryAdd)
qdf.Execute
SetStatusBar ("Setting processed date for commission shared")
Set qdf = db.QueryDefs(strQryUpdate)
qdf.Execute