- Local time
- Today, 12:59
- Joined
- Feb 28, 2001
- Messages
- 29,538
@riktek
Update and save have different meanings at a fine level. You can save a record on a form using the appropriate DoCmd.Save action along with the acCmdSaveRecord option. However, if you are going to Update something via a true Update query, you must update using VBA to trigger an SQL action. There will be no event in that case. Also, you can't make a form that actually does Updates based on an Update query. The reason is that an Update query returns no records so cannot be the basis of a form. Therefore you are in an apples-vs-oranges situation. The problem is that in Access, update is both a query type and the effect of a Save action; in the latter case, the underlying record IS updated (lower-case U) - by a Save action, not an Update (upper-case U).
With one exception... the main form participates on ALL of the tabs. If you put controls on a Tab control, they show up with and are controlled as part of the main form. If you put a form on a tab then you are right, that has to be in a sub-form control. But it is no different than a sub-form on a main form that doesn't have tab controls. You address tab-resident controls as though the tab didn't exist. Which is why you can't duplicate control names across two or more tab controls on the same form. Same name space.
Switching from one control to another in such a way as to cross tab controls has NO EFFECT on saving a record UNLESS the control losing focus was a sub-form. The presence of a tab control has NO EFFECT on saving the parent record. It is the presence of a populated sub-form control that makes the difference.
Update and save have different meanings at a fine level. You can save a record on a form using the appropriate DoCmd.Save action along with the acCmdSaveRecord option. However, if you are going to Update something via a true Update query, you must update using VBA to trigger an SQL action. There will be no event in that case. Also, you can't make a form that actually does Updates based on an Update query. The reason is that an Update query returns no records so cannot be the basis of a form. Therefore you are in an apples-vs-oranges situation. The problem is that in Access, update is both a query type and the effect of a Save action; in the latter case, the underlying record IS updated (lower-case U) - by a Save action, not an Update (upper-case U).
Any form on one of the tab pages, even the first tab page, is just another subform.
With one exception... the main form participates on ALL of the tabs. If you put controls on a Tab control, they show up with and are controlled as part of the main form. If you put a form on a tab then you are right, that has to be in a sub-form control. But it is no different than a sub-form on a main form that doesn't have tab controls. You address tab-resident controls as though the tab didn't exist. Which is why you can't duplicate control names across two or more tab controls on the same form. Same name space.
Switching from one control to another in such a way as to cross tab controls has NO EFFECT on saving a record UNLESS the control losing focus was a sub-form. The presence of a tab control has NO EFFECT on saving the parent record. It is the presence of a populated sub-form control that makes the difference.