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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error on Target machine, but not on Developing machine

Status
Not open for further replies.

Bojangles

Programmer
May 27, 2000
32
0
0
I am getting an error on the TARGET machine, yet NOT getting the error on the developing machine. I am programming in VB6 and using a database that I created with ACCESS 2000. I'm using an ADO Data Control.
“Transactions” are entered in textboxes and then appear in a datagrid. The only error I am getting is when I DELETE a transaction ON TARGET MACHINES. Now the TARGET MACHINES do not have ACCESS on them. That is the only difference I can detect that might be causing this problem. But if it is, I do not understand why, because ADDING and EDITING transactions on the TARGET MACHINES work fine. No other errors.

Any suggestions will be greatly appreciated.

Thanks,
Bojangles

Below is the code for my cmdDELETE.

------------------------------------------

Private Sub CmdDelete_Click()
On Err GoTo DeleteErr

If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "There is no current transaction to delete."
txtGrid(0).SetFocus
Exit Sub
End If

frmTransDeleteMsg.Top = frmTransTBE.Top
frmTransDeleteMsg.Left = frmTransTBE.Left
frmTransDeleteMsg.Show 1

(Note: frmTransDeleteMsg simply sends back a TRUE or FALSE for the Boolean variable, DeleteTransOK.)

If DeleteTransOK <> True Then
txtGrid(0).SetFocus
Exit Sub
End If

Adodc1.Recordset.Delete
txtGrid(0).SetFocus
MsgBox &quot;Transaction has been deleted.&quot;
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub
 
Uh oh, I forgot to say what the error was. It is
Run-time error # 5 - Invalid procedure call or argument.

Sorry about that.
Bojangles
 
Does the code delete the record? if it deletes the record, try commenting out the txtGrid(0).SetFocus statement and make it an exe and run it. All the Best
Praveen Menon
pcmin@rediffmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top