I was using this to swap out a form with subforms on it by just making
a copy and tying each to copy of the same table.
subformV1 tblVisit1
subformV2 tblVisit2
etc
Select Case TabCtl0.Value
Case 0: 'Initial Visit
Child6.SourceObject = "subformV1"
Child6.Visible = True
Child6.Locked = False
Child6.Form.FilterOn = True
Case 1: '6 Month
Child6.SourceObject = "subformV2"
Child6.Visible = True
Child6.Locked = False
Child6.Form.FilterOn = True
Case 2: '12 Month
Child6.SourceObject = "subformV3"
Child6.Visible = True
Child6.Locked = False
Child6.Form.FilterOn = True
Case Else
Child6.Locked = False
End Select
well this worked fine each subform has multible subforms but
everything on subformVx is all tied to one table.
The main form just has Id and name and its tblmain and tied to the
subforms 1 to 1 with an autoid
then we had to enter some new dates.
Main form
subform date=====tblVisit1
tabs with subforms
TblVisit1
EVERYTING works fine on visit 1
BUT when you go to visit 2 enter a date and enter some data on the
subforms and try to exit I get the old "duplicate values in index"
I am thinking (I know thats scary) that the child6 blank form that I
am using has link child to master of tblmain autoid === tblvisit1
autoid
when subformV2 is replaced it is still linked to tblvisit1 and not
tblvisit2
Can this be the problem?
How can I set the linked tables correctly in this?