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

sql tables to access database

Status
Not open for further replies.

osi2301

Programmer
Jul 3, 2004
75
AU
I have a problem with deleting records. I have a form in my database where I have included a delete button. The delete function works perfectly with an access tables (backend). When I connect that same form to the converted SQL tables (backend) it gives me an error message: run time error '3146' ODBC --call failed.

Here is my code:

Private Sub Command466_Click()
If IsNull([AsirID]) Then
MsgBox "The record contains insufficient information to delete", vbInformation, "OSMS"
ElseIf Not IsNull([AsirID]) Then

Dim lresponse As Integer

lresponse = MsgBox("Are you sure you want to permanently delete this record number from the OSMS database?", vbYesNo, "OSMS")
If lresponse = vbYes Then

Recordset.Delete

ElseIf lresponse = vbNo Then
DoCmd.CancelEvent
End If

What am I doing wrong?
 
You'll want to post this in the Access forums. Not to many people in here know much about access.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
I already have, They suggested I post here?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top