943,791 Members | Top Members by Rank

Ad:
Aug 6th, 2008
0

MS Access help needed with delete record

Expand Post »
Hi,

I am fairly new at this so please bear with me.

I created a table called vehicles with one field called vehicle. I then created a form to "Add a Vehicle" to add a new record which worked great. However, I had to go into the table and mark it as a primary key. Then, I created a form to delete a record. I made a combo box to grab records from the table, where you select the record to delete, and then used the command button to delete a record. I got error message 3022 telling me that it would create duplicate values....Is this because at the end of the table is the add new record which is blank and then delete record makes the value blank as well? Is there something I can do? I am so confused.

I spent all day creating a work around with a delete query only I am having trouble with this as well. I created a combo list to select the value and then created my own command button which sets the value and uses a delete query. Works great (the value is deleted from the table) but when I open the form to do another delete, the value still hsows up in the combo box either as the value or #delete. If I open and close a few times it goes away.

Any advice?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sunshinedaydrea is offline Offline
2 posts
since Dec 2005
Aug 15th, 2008
0

Re: MS Access help needed with delete record

Hi,

Please check the attached example.

Hope it will work for you.
Attached Files
File Type: zip Example.zip (14.6 KB, 79 views)
Reputation Points: 13
Solved Threads: 29
Junior Poster
kb.net is offline Offline
169 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS Access and FileMaker Pro Forum Timeline: Runtime error in MS-Access
Next Thread in MS Access and FileMaker Pro Forum Timeline: Delete duplicate records in MS ACCESS





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC