J
Jeff Freilich
Hi All
I am having a problem that doesnt make any sense to me - here is what
I have
A form that runs an update query to add records to a table
Everything was working fine - then I set up Referential Integrity on
the table and now I am havnig problems
The designed set up is that I open a form to add a new record and
after running some functions the update query is triggered. Couple of
things to point out:
The Form is opened in Dialogue Mode
When adding a new record the record is not saved (obviously) - I have
put a line ot code in - DoCmd.RunCommand (acCmdSaveRecord) - which is
supposed to force a save on the record before the update query is
triggered
The Update Query will work properly:
The 2nd time I open the form (i.e the record has been saved)
I step through the code to the DoCmd.RunCommand (acCmdSaveRecord) line
and it actually saves the record
I open the form first 1st time not in dialogue mode
I remove referential integrity
It will not work on the frst open of the form when adding a record
If Referential integrity is set up
If I open the form in dialogue mode
When the update query does not work I seem to be getting key vialotion
errors on my update query - it is as if the record is not being saved
if the form is open in dialoge mode and me DoCmd.RunCommand
(acCmdSaveRecord) is not being run on the dialogue form if I am not
stepping through it.
Any thoughts on what else I might be dong wrong - or anything else I
should look to try
If you need any more details please let me know
Thanks in advance for your assistance
Jeff
I am having a problem that doesnt make any sense to me - here is what
I have
A form that runs an update query to add records to a table
Everything was working fine - then I set up Referential Integrity on
the table and now I am havnig problems
The designed set up is that I open a form to add a new record and
after running some functions the update query is triggered. Couple of
things to point out:
The Form is opened in Dialogue Mode
When adding a new record the record is not saved (obviously) - I have
put a line ot code in - DoCmd.RunCommand (acCmdSaveRecord) - which is
supposed to force a save on the record before the update query is
triggered
The Update Query will work properly:
The 2nd time I open the form (i.e the record has been saved)
I step through the code to the DoCmd.RunCommand (acCmdSaveRecord) line
and it actually saves the record
I open the form first 1st time not in dialogue mode
I remove referential integrity
It will not work on the frst open of the form when adding a record
If Referential integrity is set up
If I open the form in dialogue mode
When the update query does not work I seem to be getting key vialotion
errors on my update query - it is as if the record is not being saved
if the form is open in dialoge mode and me DoCmd.RunCommand
(acCmdSaveRecord) is not being run on the dialogue form if I am not
stepping through it.
Any thoughts on what else I might be dong wrong - or anything else I
should look to try
If you need any more details please let me know
Thanks in advance for your assistance
Jeff