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!

how to set values of all the data in a table to spaces or zeros

Status
Not open for further replies.

punky

Programmer
Mar 21, 2001
29
US
I want to set the values of all the fields (records) in the table to spaces or 0 accordingly. Can I do this with a single line of code or do I have to address each field in the table separately to update it's contents. I am hoping there is an "initialize" piece of code to do this quickly since some tables have so many fields.
 
Why not just use a delete query to delete all the records in the table?
 
I need to maintain the records in the table, so I do not want to delete them.
 
If you set all fields to 0 or null, then you have effectively deleted the records. What is it you are trying to keep?
 
I have a report with several sub reports. These reports need the tables with at least one record in them so the sub reports will reflect 0 in necessary fields. If no tables exist for the sub report, that sub report doesn't show up on the main report. I don't want the report to be half there. If there are no numbers for a particular department, then zeros must be displayed on the report.

If you have a better method, please let me know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top