Entering default values into existing records

82412

Registered User.
Local time
Today, 15:24
Joined
Dec 15, 2006
Messages
25
Due to a change in working practices I needed to create new text box fields in a table, with their default values already entered. These values are to be used as merge fields in Word documents, and they will never change. I have created the required fields in the table and set the default values, but of course using that method the default values will only appear in new records, and I need them to appear in currently existing records. Is there an easy way of doing this, or do I just need to copy and paste the values into all 3000 records?
 
You can run an update query that will update all your existing records. Instead of selecting a "Select Query", select "Update Query". I recommend taking a back up of your table \ db first, if you are not used to doing this.

The SQL syntax will be like the below:

Code:
UPDATE YourTable SET YourTable.YourField = "YourValue"
 
Yes, or I could just go to the table and do Find/Replace. Brain was a bit slow this morning, looking for a complicated solution instead of an easy one!
 
Curious as to why you want to store static data. You could add this as a calculated field in a query and use the query for the merge.
 
The "data" is e-mail addresses (one in each field). A specific e-mail address has to be entered into a letter, depending on which user is sending the letter. I'm using Albert D.Kallal's Word Merge which allows me to store any number of letter templates and send a single letter based on a single record. Hope that makes sense.
 

Users who are viewing this thread

Back
Top Bottom