Bojangles
Programmer
- May 27, 2000
- 32
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 "Transaction has been deleted."
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub
“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 "Transaction has been deleted."
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub