var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Determine if a Subform is in Edit Mode
How do I determine if a SubForm is in Edit Mode or not?
If I can figure out how to see if a subform is in edit mode, I can solve the problem I am having...
(it is a long procedure to explain all of it here, so the basics are provided)
Here is the Issue - I have a Main Form with a few SubForms
When I am in Edit Mode on a SubForm, and if I open another Form that Runs an Update on the Data, I get an Error Message on the Requery Event....
frmInventory - Main Form
frmInventoryItemsSF - SubForm with Inventory Items
(there are also other SubForms, but not needed for this issue)
In the OnActivate Event I have a statement that requeries the SubForm
Another form, where stock is ordered, runs an update - all works fine if the FrmInventory is Closed, or even if it is Open - UNLESS I am editing a record on it that is affected by the update...
then I get
Runtime Error 2118
You must save the current field before you run the requery action
This is an .ADP file, but the functionality should be the same using an .MDB File.
have a look at the "Dirty" Property of the subform. it tells you whether data in a form has been changed
Then perhaps simply save the field (record) before the Requery.
This is what I did to Solve the Issue
Originally Posted by CyberLynx
I did just this and it resolved the issue - it does restrict the User from using an "Undo" command, but it is better than the error message!!!