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!

MSAccess FrontEnd/MySQL BackEnd and #Delete?

Status
Not open for further replies.

Apollo6

Technical User
Jan 27, 2000
418
US
Not sure if this should be posted here or in the MySQL forum but I'll try here first to see if anyone has had the same situation.

I have converted a MSAccess(2000) database to MySQL. I am using MSAccess forms/queries/reports/modules and linking to the MySQL database via MySQL ODBC (v3.51).

The problem is that when I insert a new record via MSAccess form, on the save command, all the fields on the form which pull from the MySQL database automatically go to "#Delete". I can close the form, find the record I just inserted, and all is fine. How do I prevent the "#Delete" situation from occuring? I've tried Me.Refresh and Me.Requery but no luck.

Thanks for any suggestions.
 
Does the linked table has a primary key ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yes, the table has a primary key. It is an auto-increment from the MySQL backend.

The MSAccess form properties:

Default View = Single Form
Allow Edit = Yes
Allow Deletions = Yes
Allow Additions = Yes
Data Entry = Yes

Could it be how the properties are set on the Access form?

OR

Does the primary key need to include an additional field? Possible issue with the column type on the primary key?

Thanks for the input.
 
After some more digging on MySQL website, I found an article specifically about this situation. There were several causes and solutions. The first one I tried fixed the problem. I inserted a dummy_field in the table(s) with the type 'TIMESTAMP' and presto, no more #Delete issue when entering a new record.

Thanks again for the initial post, that was also one of the possible issues that would cause the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top