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

Delete Record via form

Status
Not open for further replies.

b3026

Programmer
Jun 23, 2004
5
US
I have a form designed to basically open another form. The reason for this is simple. From my main menu, when you click the button to edit/delete inventory, a box appears that shows the stock # and model. When you highlight a piece of inventory and click the select button (or when you double click the piece of inventory), another form opens so you can view everything about this piece of inventory.

On the form which opens when you click to edit/delete inventory, I have put a button to delete a piece of inventory. But the button does not work.

How do I achieve this since it would be much easier to delete from a list showing all pieces of inventory?

Thank you for your assistance.
 
Hi!

Welcome to Tek-Tips. Here's a litle faq on how to get the most out of the memberhip faq181-2886.

For some of us to be of assistance, it might help to know what you're trying now, and what happens. Else some way of deleting might be:

[tt]docmd.setwarnings false
docmd.runsql "Delete * from yourtable where idfield = " & me!txtIDControl
docmd.setwarnings true[/tt]

- replace yourtable, idfield and controlname with respective names from your database.

Roy-Vidar
 
Thanks for your quick answer. Before I review it, let me explain that I have been programming in Access for about 3 years, but not to any large degree. The program I am currently working on is one that we use at my office to print window stickers for our inventory. I am working to add some features to the program as enhancements.

Many things I know about the software, but sometimes I hit a snag that I can't get past and need assistance.

Anyway, again I will always appreciate any help with my issues. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top