i have a following code..
Private Sub cmdOK_Click()
If Me.tempBal < 0 Then
MsgBox "The amount is larger than the balance"
Else
CurrentProject.Connection.Execute _
"Update tbl_fsource " & "SET balan =" & Me.tempBal & " WHERE BFSIX='" & Me.LstBud.Column(7) & "'"
CurrentProject.Connection.Execute _
"update tbl_fsource " & "SET voupa = voupa + " & Me.txtAmount & " Where bfsix='" & Me.LstBud.Column(7) & "'"
MsgBox "Your transaction has been completed"
End If
Me.LstBud.Requery
DoCmd.OpenForm "frma_purrequisitionmenu", , "qry_fsource_query"
exit_cmdOK_Click:
DoCmd.Close acForm, Me.Name
Exit Sub
End Sub
query is nothing more than adding few columns to get a total. table updates correctly if i run the query manually but with the code above, query doesnt update (or doesnt even run it seems like) anything...
any help?
Private Sub cmdOK_Click()
If Me.tempBal < 0 Then
MsgBox "The amount is larger than the balance"
Else
CurrentProject.Connection.Execute _
"Update tbl_fsource " & "SET balan =" & Me.tempBal & " WHERE BFSIX='" & Me.LstBud.Column(7) & "'"
CurrentProject.Connection.Execute _
"update tbl_fsource " & "SET voupa = voupa + " & Me.txtAmount & " Where bfsix='" & Me.LstBud.Column(7) & "'"
MsgBox "Your transaction has been completed"
End If
Me.LstBud.Requery
DoCmd.OpenForm "frma_purrequisitionmenu", , "qry_fsource_query"
exit_cmdOK_Click:
DoCmd.Close acForm, Me.Name
Exit Sub
End Sub
query is nothing more than adding few columns to get a total. table updates correctly if i run the query manually but with the code above, query doesnt update (or doesnt even run it seems like) anything...
any help?