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

Delete selected records 1

Status
Not open for further replies.

ninash

Technical User
Jul 6, 2001
163
GB
Hi All,

I have created a record set of records from a table that due to the cancelling of a report need to be deleted, However I am not sure how I continue from this point. Please could someone point me in the right direction.

Thanks In Advance

Tony
 
better to be more explanative,
u can delete with query
DELETE * FROM <table> WHERE [criteria]
u mean u select the records in a combobox?

Hear from u again,
Gerard
 
Hi Gerard,

Thanks I did think it was quite that simple.

And in answer to your question No that is for a different task. Same database but a different section.

This request was because of the way access writes its records. Rather then filling the database up with junk I want to remove it if for some reason the user needs to exit the function that they are in. Clean it so only current information is present.

anyway thanks for the prompt reply

Tony
 
Hi Gerard,

Seems things arn't as clean cut as I first thought

My code line is as follows
CurrentDb.Execute &quot;DELETE * FROM [RiskCodes with ReportKey] WHERE ReportKey = me![ReportKey];&quot;

But I get the following error

Too Few Parameters. Expected 1

Both fields are text fields and I am suspecting it is just a formating problem.

Could you help me again???

Tony
 
sorry for late reaction but I give a try
CurrentDb.Execute &quot;DELETE * FROM [RiskCodes with ReportKey] WHERE ReportKey ='&quot; & me![ReportKey] & &quot;'&quot;
If reportKey is a textfield u need the quotes

Hope this helps,
gerard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top