Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compile error (possibly referrence problem?!?!)

Status
Not open for further replies.

wshm

Programmer
Dec 7, 2006
62
US
Im getting a compile error (method or data member not found) when I click on the command button with the follwing codings.

Private Sub cmdTransfer_Click()

Dim SQL As String
Dim RecordsAffected As Long

If Me.txtTempBal < 0 Then
MsgBox "The amount you wish to transfer is larger than the balance"

Else

SQL = "UPDATE tbl_BudMaster SET " & _
"balan = " & Me.txtTempBal & ", " & _
"voupa = voupa + " & Me.txtAmount & " " & _
"WHERE [BFSIX] = '" & Me.lstCbfsix.Column(5) & "'"

CurrentProject.Connection.Execute SQL, RecordsAffected

Debug.Print SQL
Debug.Print RecordsAffected

MsgBox "Your transaction has been completed"

End If
Me.lstCbfsix.Requery
DoCmd.OpenForm "frm_MainMenu", , "qry_UpdateBudMaster_Balance"

exit_cmdOK_Click:
DoCmd.Close acForm, Me.Name
Exit Sub

End Sub


can anyone pin point what's giong on?
 
This often means you have misnamed a control, what line does it stop on?
 
Try compiling. See what lines it stops on and check the spelling of the controls.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top