Z
ZRexRider
Hi,
Logically I believe this should work and actually, sometimes it does
but there must be something "illegal" about what I'm doing because it
eventually crashes MS-Access (2003 SP1)
In a nutshell - I have a control on a line item of a sub-form that is a
continuous form. If there are 15 line items then there will be 15
controls. If user clicks one of these controls - I popup modal form to
request additional information. After user enters additional info on
this sub-form, I want update a field in the recordset at the row where
the control was clicked.
Seems straightforward and by golly it actually works sometimes (just to
tease me). However very soon I get the ugly "Access is crashing please
let me tell Bill Gates what went wrong message". This happens
executing the exact same line of code:
Forms!frmMainForm.frmSubForm.Form.Recordset"txtFieldToUpdate").Value =
strDataToUpdateFieldWith
Logically that line updates a the current record set / line item on the
form that called it and when it works it does exactly the way I would
expect. Once it fails, it fails catastrophically every time it hits
that line - if i comment out the line, Access stops failing.
Soo... is it a bad thing to update a record set on a sub-form from
another modal form?
This is what bugs me about developing in Access. There are errors that
get presented through the error object and then there are those errors
that shut down Access and have no logic.
Any ideas - I'm stumped?
Logically I believe this should work and actually, sometimes it does
but there must be something "illegal" about what I'm doing because it
eventually crashes MS-Access (2003 SP1)
In a nutshell - I have a control on a line item of a sub-form that is a
continuous form. If there are 15 line items then there will be 15
controls. If user clicks one of these controls - I popup modal form to
request additional information. After user enters additional info on
this sub-form, I want update a field in the recordset at the row where
the control was clicked.
Seems straightforward and by golly it actually works sometimes (just to
tease me). However very soon I get the ugly "Access is crashing please
let me tell Bill Gates what went wrong message". This happens
executing the exact same line of code:
Forms!frmMainForm.frmSubForm.Form.Recordset"txtFieldToUpdate").Value =
strDataToUpdateFieldWith
Logically that line updates a the current record set / line item on the
form that called it and when it works it does exactly the way I would
expect. Once it fails, it fails catastrophically every time it hits
that line - if i comment out the line, Access stops failing.
Soo... is it a bad thing to update a record set on a sub-form from
another modal form?
This is what bugs me about developing in Access. There are errors that
get presented through the error object and then there are those errors
that shut down Access and have no logic.
Any ideas - I'm stumped?