473,320 Members | 1,926 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

getting duplicates with subforms and different tables

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?
Jun 27 '08 #1
0 1353

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: radioman | last post by:
Hi all, I would appreciate some help please. I just need pointing in the right direction as I am at a loss. Basically I have a form (frmAddMaster) which displays two subforms "Master Stock...
1
by: MHenry | last post by:
Hi, I have a table with duplicate records. Some of the duplicates need to be eliminated from the table and some need not. A duplicate record does not need to be eliminated if the one record...
2
by: jballard | last post by:
Hello, I have a database set-up with a form and two subforms in it. I have one of the subforms (replacement parts) set-up where you can pick part numbers from a drop down box and also pick a...
11
by: Jerry | last post by:
Say a table has four fields: ID (PK) Field1 Field2 Field3 Field 1 is indexed as Yes(No Duplicates) When a duplicate is entered in Field1, nothing happens until you try to save the record then...
3
by: tlyczko | last post by:
I have a main form with 2 subforms, each subform references different data in the same table. How do I make sure each subform only creates NEW records in the referenced table and do not...
4
by: yin_n_yang74 | last post by:
I am new to SQL and SQL Server world. There must be a simple solution to this, but I'm not seeing it. I am trying to create a crystal report (v8.5) using a stored procedure from SQL Server...
22
by: banderson | last post by:
Hello I'm new to developing databases in Access and using Access2003. I have a dataset with a few many to many relationships that I have created linking tables for to make multiple 1:M relationships....
3
by: ryan.paquette | last post by:
In the table there are 2 fields in which I wish to limit (i.e. No Duplicates) Although I do not want to limit them to "No Duplicates" separately. I need them to be limited to "No Duplicates" as...
5
sickenhoofer
by: sickenhoofer | last post by:
I have a form w several subforms. The ultimate goal would be to click on a location, and have the data in the other subforms change to the data specific to that location. For this form, there are...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.