- Local time
- Today, 05:01
- Joined
- Feb 19, 2002
- Messages
- 45,857
If the notes are in a separate table, then there is no problem. If the notes are in the same table, why not just include the column in the RecordSource and update it with:
Me.MyNotes = "blah blah"
If the notes are in a separate table and I know I want to update them, I just include the table in my RecordSource query. I never run update queries for stuff like this. Update queries are for bulk updates. If I already have a recordset open with the record I want to update, why incur the overhead of running a query? not to mention the database bloat if you actually have the SQL string in your code. Plus you also generate this conflict message if the record is dirty.
Any field update that you want to do should probably be done in the Form's BeforeUpdate event. Most of my tables have LastChangedDate and LastChangedBy columns and I populate those in the BeforeUpdate event of each form. These columns are not usually visible and are not bound to controls on the form.
Me.LastChangedDate = Now()
Me.LastChangedBy = Environ("UserName")
Me.MyNotes = "blah blah"
If the notes are in a separate table and I know I want to update them, I just include the table in my RecordSource query. I never run update queries for stuff like this. Update queries are for bulk updates. If I already have a recordset open with the record I want to update, why incur the overhead of running a query? not to mention the database bloat if you actually have the SQL string in your code. Plus you also generate this conflict message if the record is dirty.
Any field update that you want to do should probably be done in the Form's BeforeUpdate event. Most of my tables have LastChangedDate and LastChangedBy columns and I populate those in the BeforeUpdate event of each form. These columns are not usually visible and are not bound to controls on the form.
Me.LastChangedDate = Now()
Me.LastChangedBy = Environ("UserName")