MS Access help needed with delete record

Please support our MS Access and FileMaker Pro advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Dec 2005
Posts: 2
Reputation: sunshinedaydrea is an unknown quantity at this point 
Solved Threads: 0
sunshinedaydrea sunshinedaydrea is offline Offline
Newbie Poster

MS Access help needed with delete record

 
0
  #1
Aug 6th, 2008
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?
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 160
Reputation: kb.net is an unknown quantity at this point 
Solved Threads: 26
kb.net's Avatar
kb.net kb.net is offline Offline
Junior Poster

Re: MS Access help needed with delete record

 
0
  #2
Aug 15th, 2008
Hi,

Please check the attached example.

Hope it will work for you.
Attached Files
File Type: zip Example.zip (14.6 KB, 20 views)
It is never about the number of languages you know, you either have the logic of programming or you don't ...

Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC