I am running 2 subforms from a main form with control being given to one of the subforms ... the subform in question does nothing but list a subquery ... what I am doing is traping all keys and button clicks in the subform and calling parent subs to update the second subform ...
Mainform has subFormView and subFormQry where subFormQry has focus and is in datasheet view ... if I click on any field in any row a parent sub frmUpdate() needs to reference a pointer field in the subFormQry using vaPntr = me.subFormQry.Form.pntr however if I use the up/down arrow keys, even though the subform has been updated it is only reading the last/previous row value.
The reason this is happening is because I incorrectly called the parent before the subform had completed its update (called in the last part of the Keydown event ... I know ... "wrong wrong wrong" ... it was a grey moment)
Does anyone know what the most logical form event would be to capture this change? I have tried form.selectchange and datachange but they don't appear to fire.
Also ... using the Form Current event with
Application.RunCommand acCmdSelectRecord ' select entire record row
is only selecting the first field in the first row ... yet this call works properly after the first key stroke ... it just appears to mess up when the form is transfered focus ... I suspect this may be a cart before the horse issue ... perhaps there is a better form Event to be calling this command from?
Mainform has subFormView and subFormQry where subFormQry has focus and is in datasheet view ... if I click on any field in any row a parent sub frmUpdate() needs to reference a pointer field in the subFormQry using vaPntr = me.subFormQry.Form.pntr however if I use the up/down arrow keys, even though the subform has been updated it is only reading the last/previous row value.
The reason this is happening is because I incorrectly called the parent before the subform had completed its update (called in the last part of the Keydown event ... I know ... "wrong wrong wrong" ... it was a grey moment)
Does anyone know what the most logical form event would be to capture this change? I have tried form.selectchange and datachange but they don't appear to fire.
Also ... using the Form Current event with
Application.RunCommand acCmdSelectRecord ' select entire record row
is only selecting the first field in the first row ... yet this call works properly after the first key stroke ... it just appears to mess up when the form is transfered focus ... I suspect this may be a cart before the horse issue ... perhaps there is a better form Event to be calling this command from?