473,756 Members | 7,293 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.SourceOb ject = "subformV1"
Child6.Visible = True
Child6.Locked = False
Child6.Form.Fil terOn = True
Case 1: '6 Month
Child6.SourceOb ject = "subformV2"
Child6.Visible = True
Child6.Locked = False
Child6.Form.Fil terOn = True
Case 2: '12 Month
Child6.SourceOb ject = "subformV3"
Child6.Visible = True
Child6.Locked = False
Child6.Form.Fil terOn = 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=====tblVis it1
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 1385

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

Similar topics

3
3421
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 subform" and "Client Stock Template subform". Each subform contains the following fields "Product ID,Product Description and Size". What I am trying to do is to select rows from the "Master Stock subform" and copy them to "Client Stock Template...
1
1674
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 appears multiple times on one employee's report. However, if the same record(s) appear on any other employee's report, it means they collaborated on the item, and the item from the second employee's report should be eliminated from the table.
2
1422
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 description of the part from a drop down box. These are two separate fields. I want to be able to pick the part number and have it put in the description automatically or the other way around. Which ever would by easier? I have a table with just...
11
3822
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 this error message appears: "The changes you requested to the table were not successful because they would create duplicate values in the index, primary key or
3
518
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 overwrite or change data in previously created rows?? Otherwise I have to use two different tables, with similar kinds of data, for each subform, which may well be the way to go even though it's not really normalized, to make the data entry easier and...
4
7091
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 (v2000) in order to report from two databases and to enable parameters. When I create the stored procedure, it joins multiple one-to-many relationship tables. This results in repeated/duplicate records. Is this an issue that should be solved within...
22
3223
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. My problem is trying to figure out a set of forms and subforms for this data in which the users can enter new data in a straightforward way. In my dataset there are: Buildings, Contacts, addresses for buildings and contacts, and different types of...
3
2851
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 if they were one field. The 2 fields are "Employee_Name" & "Training_Course". *(There is another table for Employees & another for Training Courses, both of which are related to this table.)
5
2280
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 4 main tables (below). Here is the pertinent detail for the tables involved. tblProviderMain (table 1) ProviderMainID (PK, Autonum) tblProviderNumbers (table 2) ProviderNumberID (PK, Autonum) ProviderMainID (global join to tblProviderMain)
0
9117
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9679
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9541
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8542
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3651
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3141
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.