82412
05-05-2008, 04:33 AM
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?
Kiwiman
05-05-2008, 05:15 AM
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:
UPDATE YourTable SET YourTable.YourField = "YourValue"
82412
05-05-2008, 05:28 AM
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!
neileg
05-06-2008, 02:08 AM
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.
82412
05-06-2008, 04:36 AM
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.