Query to delete only one record from table

AunN

Registered User.
Local time
Today, 01:24
Joined
Dec 10, 2011
Messages
16
Dear Programmers!

As i m very new to access so i m facing many difficulties. I have a query.

I need to know the query to delete specific record from the table. As i have written this query but it is not working properly.

DELETE * from Transaction where TransactionNumber = TransactionNumber.value

TransactionNumber.value is the text field value.

I have to run this query in Macros.

Please guide me!
 
it is not working properly
Can you be more specific? Are there error messages etc?

Anyway, it looks like you're not referencing the field on the form correctly. Try this:

Code:
DELETE * from Transaction where TransactionNumber = [Forms].[[COLOR="Red"]myForm[/COLOR]].[TransactionNumber]

You need to change myForm to the name of your form. I'm assuming you are not using subforms.

hth
Chris
 
Its Done!!

Thanku..u were right!!

One thing more once the delete message box appears asking for yes or no, on selecting yes i get another message box which states Resume without error. I click ok but it doesn't disappear. How it can be resolved?
 

Users who are viewing this thread

Back
Top Bottom