Subform Write Conflicts

Karl427

New member
Local time
Today, 01:35
Joined
Sep 25, 2015
Messages
3
Hi guys

I have a small but incredibly annoying issue with a form that contains two sub forms on tabs.

Parent form frmJobMaster is based on table Jobmaster which includes a string field JobNo.

Both subforms are based on queries from table JobItems which include linked field JobNo for each item.

On subform 1 I select JobNo, Item, Quantity and Price.
On subform 2 I select JobNo, Item, Condition.

The problem is that if I change a record in Subform 2, then select the tab with Subform 1 get the popup 'Write Conflict' with options to 'Save Record', 'Copy to Clipboard' or 'Drop Changes'.

However if I change a record in Subform 1, then select the tab with Subform 2 everything is fine.

I have included
If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord
in OnLostFocus, OnDirty and AfterUpdate events on both subform and refresh everything in the Tabbed Supforms Change Event but still keep getting this prompt and despite 3 days searching the Internet cannot find a may to avoid this message, or effectively trap it and provide a default answer.

:banghead:

Has anybody got a workaround for this?
 
you cant have 2 sub forms pointing to the same table.
they each must point to different tables.
OR
only use 1 subform, and change the record source upon Tab change.

do the subforms have the linking fields set?
 
Thanks for looking Ranman.

Both sub forms are linked to the same parent field (JobNo) and use different queries based on the same table.

I guess I'll have to rethink the logic on how I display this to the user.
 

Users who are viewing this thread

Back
Top Bottom