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

Finding all related records in tables and printing then deleting

Status
Not open for further replies.

dougal1269

IS-IT--Management
Sep 20, 2004
17
US
This was a strange request that came down from management ... basically they want some safe guards when deleting records. The database consists of device names, IP addresses and port information located in multiple tables. Currently we run a query to cleanup data that remains after a device has been deleted. What they are looking for is all the data gets reported then deleted.

So my question is "How do I make a query to print all relevant information to a document then delete all relevant information."


Dougal
"Sentio aliquos togatos contra me conspirare."
(I think some people in togas are plotting against me.)
 
This is VBA Coding forum - try forum701 (queries and sql forum), but before that, there is probably plenty of information on how to create queries, how to print the results, how to delete... in both the help files and found thru a search here. I think also the general idea is not to expect us to program things for you (see faq181-2886 #8, #10, #14), but help if there's something you can't get to work.

Roy-Vidar
 
I am not having problem with stand alone queries ... I have a few queries that find the data but when I try to exsport to a file ... in this case excel I am getting an error "You selected more records than that can be copied onto a clipboard at one time" but the records do not excede 65,000 characters. So I need to figure a way of getting the info, print it then delete it. Arg ... my boss is trying to kill me slowly thats what it is.

Dougal
"Sentio aliquos togatos contra me conspirare."
(I think some people in togas are plotting against me.)
 
Then perhaps try avoiding the clipboard;-)

Some of the methods, transfertext, outputto of the docmd object should move directly to files

Creating an instance of excel, you can either loop all of the records of a recordset, or try the .copyfromrecordset method of Excels range object (works on both ADO and DAO recordsets)

But, then there's also the "old" limitation of Excel, XL: Passed Strings Longer Than 255 Characters Are Truncated...

Without knowing what you're doing, all we can supply is "general" stuff, seing the code, where it bombs... makes it a bit easier to assist, re #14.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top