General :: Linking 2 Subforms To Parent Form - Merging Duplicate Records

Aug 28, 2014

Users are too lazy to check whether a patient record exists or not. Consequently, we have a number of duplicate records that I would like to merge.

My problem is finding a way of linking 2 subforms to a parent that is not based upon a query.

On the parent form, I want two Comboboxes called 'Patient_to_Keep' and 'Patient_to_Discard'.

The two subforms called Frm_DUP_Patient1 and Frm_DUP_Patient2 should then display the data of the respective combo boxes.

Once I have this working, I can write the necessary code to compare and update the data as required.

View Replies


ADVERTISEMENT

Forms :: Duplicate Records Created Using Two Subforms In Main Form

Jun 23, 2014

I have created a database in microsoft access 2010 to show invoices for different customers in different countries. In doing so, I created using a two subforms in a main form. I have used the "country name" to link the subforms to the main form. When I enter new records into the subforms for a specific country, I realized that a duplicate record of an old record are being created in the subforms. What can I do to prevent this from happening? I tried to change the query link between the main form and subform to "invoice number" but the same problem has occurred.

I am novice to microsoft access 2010 ...

View 3 Replies View Related

Merging And Deleting Duplicate Records

Jan 6, 2012

I have an Access table with a number of records which refer to the same [InvoiceNo] but with data in different fields. Normally, my database works like this:

1)Import data from Excel File to tblMain in Access
2)Import data from Excel File to tblVendorLine in Access
3)Import data from Excel File to tblDunning in Access
4)Query is sorting from two first tables only records that refer to the third one (by InvoiceNo)
5)We have only items from tblDunning with data from other two tables to be send (mail to the vendor).

The point is, that when I have relation between those three tables, I receive only few records, but sometimes - for example - tblDunning refers to 5 records in tblMain and to 7 records in tblVendorLine - but there is only 4 records related between tblMain and tblVendorLine, so query shows me only two records. Ive made a query for each table (tblMain & tblVendorLine - relation with tblDunning). Then make one query of those two queries. It append data to new table tblDunnAll

So for example the table would look like this after

Vendor | InvoiceNo | CoCode | Status | Clearing_Date | PBk
100000 23333 GB11 23/12/2011
233332 121212 GB18 16/12/2011
233332 121212 Complete K
134444 777777 GB12 Complete
100000 23333 GB11 Complete K

What I'd like to have is a table with:

Vendor | InvoiceNo | CoCode | Status | Clearing_Date | PBk
100000 23333 GB11 Complete 23/12/2011 K
233332 121212 GB18 Complete 16/12/2011 K
134444 777777 GB12 Complete

how to go about merging the data for each name into one record. There are lots of very useful posting about using SQL to delete duplicate but I can't find a posting with addresses this issue.

View 1 Replies View Related

Executing A Subforms Procedures From The Parent Form

Dec 19, 2005

is there a way i can call a sub forms procedure from the main parent form.

in other words i have a button command i want to execute

View 2 Replies View Related

Linking To Parent Form In Query?

Jun 17, 2005

I have a query which is run in a subform... however, I need a value from the parent form.

How do I link to this value in the parent form?

The query should look like:
SELECT tbl2.name, tbl.number
FROM tbl1 LEFT JOIN tbl2 ON tbl1.aID = tbl2.aID
WHERE tbl2.aID = parentform.[aID]

Now, the question is about the WHERE clause... how do I link to the parentform?

any help is appreciated
Jazz

View 2 Replies View Related

Forms :: Linking Two Unrelated Subforms To Main Form

Feb 5, 2014

I am trying to link two unrelated sub forms to a main form so I am able to query data all at once and make a report that displays all this data at once. I do not know if this is possible. I will tell you to the best of my ability about what I have going on.

My main form is a shift report. The primary key is a auto number ID. The rest of the fields are date, name, shift, vehicle. etc.

The first sub form is area attendance. Field are as follows auto number ID (primary key), report ID(which comes from the main form, linked), the area, and the area attendance.

The second sub form is the event log. Fields are as follows auto number ID (primary key), report ID(which comes from the main form, linked), time in, and events.

My relationship now is simply primary key from the shift report (the autonumber) going to the first and second subforms report ID's.

Problem is I can not query two distinct subforms like this (I realized).

View 1 Replies View Related

Update Subforms - No Parent/Child

Dec 24, 2005

I have a main form with 2 subforms. Subform 1 shows the results of query 1, subform 2 shows the results of query 2.

Query 2 uses query 1 as a starting point. Query 1 is updated with an option group on the main form. In other words, when I select an option on the main form, qdef for query 1 is updated and query 2 will also be affected.

If I select an option the subforms don’t update. If I close and reopen the main form, the subforms show the correct information so the queries are being updated but the subforms are not showing the updated information.

I’ve been trying to requery the subforms using the following code in the OptionGroup_Click() event:

Forms![MainForm].[Subform1].Requery
Forms![MainForm].[Subform1].Requery


By the way, I don’t have any parent/child relationships.

Am I missing something simple.

View 12 Replies View Related

General :: Add Another Parent Name From A Form To A Subform

Jun 27, 2012

I added a text box on my main form. I have to other parent names in a subform that I would like to add to my main form. I have this working just using one parent name "dtdrec" that is working. How would I add "flduser" and "fldstuff".

=[tblPayEstimates Subform].[Form]![dtdrec]

View 7 Replies View Related

Forms :: Delete Records In Subform Based On Check Box In Parent Form

Mar 1, 2015

I have a parent form and connected to it is a subform. On the parent form I have a checkbox which enables and disables fields on the parent form and also hides the subform.

What I want to do is when the user unchecks the checkbox, this action also deletes the associated subform records, if there are any.I'm sure that this can be done with an SQL Delete query in VBA.

View 5 Replies View Related

General :: Link Parent / Child Node To A Control On Main Form In Treeview

Oct 7, 2012

I downloaded a sample treeview application I have modified most of its to suit my need, except one thing. I want link parent/child node the main form to the main form through a subform on the CategoryID.

The following is the original code where when a child not is clicked only pops up a "linked" msgbox. I need to modify the part of the code on the Select Case "C" in red:

Code:
'----------------------------
Sub DisplayForm(i As Integer)
'----------------------------
' for this Treeview I do not want a double-click on a parent node
' to open the applicable Category form, but pressing the shift key
' should open the marriage form applicable to the parent node. Shift
' or double-click on a child node should open the applicable
' offence form.

Dim strKey As String
Dim strTag As String
Dim strFilter As String

[Code] ....

View 1 Replies View Related

Merging Data From Duplicate Database Files

Mar 18, 2015

We have a client who has managed to muck up their Access database by means of having two users on two computers attempting to use and modify it at the same time, and the primary (actually, the only) location for the database is on Dropbox.

What seems to have happened is that Dropbox detected a conflict, with two different versions of the same file, and resolved this by creating two separate files. How long this went on before the client noticed that they were entering data into two separate files, I can't say.

Their client list is 28,000 someodd people long. What I need to know is if there's a process for merging the two files together, without creating 28,000 duplicate entries. This is being run on Access 2002.

View 2 Replies View Related

Forms :: Check / Uncheck Checkbox On Parent Form If Records Exist Or Not In Subform

Jul 23, 2015

I have a parent form which has a yes/no checkbox in the form's record source. Then in that parent form I have a sub-form. If NO records exist in the sub-form I want the checkbox to be UN checked. If records DO exist in the sub-form, I want the checkbox to be CHECKED.

But I want this to happen as records are added or deleted from the sub-form. In other words, if the parent form is opened and no records exist in the subform then the checkbox should be unchecked. But as soon as the first record has been entered in the subform, the checkbox on the parent form should be checked. Likewise, as soon as the last record has been revoved from the sub-form, the checkbox on the parent form should be unchecked.

What code do I need to accomplish all of this?

View 1 Replies View Related

Queries :: Merging Two Separate Databases With Duplicate As Well As Unique Information

Jun 12, 2013

Currently am trying to get together two separate Access Databases into one, which is the way it was always supposed to be.

Basically, this person accidentally created a duplicate of the database in question, and has been updating both independently at different times, meaning that whilst a lot of the database information is duplicate, there are some instances where each separate database copy has unique information on both existing contacts, and new unique contacts.

The database itself is about schools, and has tables concerning information such as calls made, contact details, school details, etc etc. Obviously all of this needs putting back together into one set of tables in one file.

I've been messing around with append and import functions, but am having issues with duplicate ID fields with append queries, and a general lack of direction on the best way to go about fixing this problem, if its even possible.

Here's an example of what i've been trying to do:

INSERT INTO Contacts ( ContactID, ContactTitle, Name, Surname, JobTitle, TelephoneSTD, Telephone, FaxSTD, Fax, Locale, SubjectKeyword, SchoolID, Reply received] )
SELECT [1Contacts].*, [1Contacts].ContactID, [1Contacts].ContactTitle, [1Contacts].Name, [1Contacts].Surname, [1Contacts].JobTitle, [1Contacts].TelephoneSTD, [1Contacts].Telephone, [1Contacts].FaxSTD, [1Contacts].Fax, [1Contacts].Locale, [1Contacts].SubjectKeyword, [1Contacts].SchoolID, [1Contacts].[Reply received]
FROM 1Contacts;

View 9 Replies View Related

General :: How To Create Relationship With Duplicate Records

Mar 21, 2014

See attached picture where I am stuck at?

I have a table that holds UK Postcodes and a customer table that holds customers.

I am trying to create a relationship between the 2 so when I enter a postcode in the customer table this is then related to the postcode table.

The main problem I have is that there is a lot of duplicate postcodes in postcode table so the primary key is simply a number as you will see in the picture.

View 2 Replies View Related

Linking Two Subforms

Apr 30, 2005

I’m truly sorry about posting a question that probably should be found by searching this forum. However, despite some ambitious, but not very fruitful, efforts to locate answers to it, I’ve decided to start this thread anyway.

I’ve used a sample database to create a contact database. The sample database contains a table called “Samtal” (which in English should translate into something like “calls”). The idea is that every contact in the database has a 1:N relation to the samtal table. It means that the user continuously can update the Samtal table for every phone call made to different contacts.

Every contact has a unique contact ID, which links the two mentioned tables together. Every entry in the Samtal table has a unique Samtal-ID (called “samtalsnummer”) as a primary key.

In order to easily access, administer, create and modify different entries in the Samtal table, the form “Kontakter” contains a button called “Anrop”. Clicking on this button, a new form, “Samtal” opens (taking the contact number as input from the active contact in the form from which the button was pressed).

The Samtal form contains two subforms (“underformulär” in Swedish):
1. Listing all the entries that are found in the Samtal table for the active contact’s contact number.(samtaslista underformulär)
2. Stating the content of the phone call. (samtal underformulär)

Very conveniently, the user can scroll through the list (in the first subform) and by picking/marking a certain entry, be able to see the content of the particular call (in the second subform).

My idea was basically to copy the Samtal table’s and form’s architectures to create a table for addresses, and in this way be able to assign every contact an arbitrary amount of addresses (and in this way keep track of old addresses as well).

After have done this, and even added an “Adress”-button in the Kontakter form. (Note that every address entry is to be assigned an “address type” collected from a predefined table called adresstyper.) Somehow, however, I can’t get it work at all. Gatuadress (Street address), Husnummer (Street number), Postnummer (Zip code) and the other fields found in the second subform (“adresser underformulär”) aren’t working.

My simple question is why it isn’t.

Any ideas, literature suggestions or comments are highly appreciated as I’ve been struggling with this for over two weeks. I’m attaching the database to this post.

Thanks a lot in advance!

View 12 Replies View Related

Linking Subforms

May 6, 2005

I am sorry if similar questions have been asked by others but my understanding of subforms isn't good enough to apply other answers to my problems.

Essentially I have two problems. My situation is that I have a form with 4 tabs. Two of these are just straightforward tabs which have certain fields that must be completed. Originally I only had two tabs and then you would click on a button to open a different form. Before opening it qould test that the key fields had been completed and then open the form. I have now added this to the original form as a subform for the third tab. I suspect it may be rather obvious but I don't know how to apply the same logic so that I cannot switch to this tab until the key fields in the previous two tabs have been completed.

My second problem has to do with my understanding of how subforms link I think. My fourth tab is also a linked subform. When I have data in the first two tabs this form is visible but when there is not data this form is not visible. Why might this happen with this subform but not with the subform on the third tab which is currently always visible regardless of the data?

I hope this is clear but if it's too abstract please let me know.

Many thanks

View 1 Replies View Related

Linking Two Subforms

Oct 25, 2006

Hi, all--

What is the simplest way of linking two subforms so that selecting a record in one subform will result in specific related records in the other subform?

THe subform where the initial record will be selected is linked to the main form but the other is not and has no fields in common with the main form.

I do have some VBA experience, although it has been a while.

Thanks!

Paul

View 6 Replies View Related

Linking Subforms In A One To Many Relationship

Aug 4, 2005

Hello,

We are a theatre company attempting to link our bookings and contacts tables in a form - subform which can be viewed in chronological date order. We are having trouble establishing a one (contacts) to many (events) relationship and setting up the forms as such. What are some easy steps to ensure that both forms are visible, functional, and appear in the order we require? As of now, we only have the two separate forms built (along with the corresponding tables). The relationship field, we presume, is the organization contact itself, and the main form would be the events with the contact appearing as a subform at the bottom of the page.

Thank you for your help!

View 5 Replies View Related

Another Question On Linking Subforms...

May 6, 2005

Hi,

I tried searching for an answer, but with no luck.
My problem is with linking master/child forms.
What I want the subform to do is to show me a list of records that have the same "GroupID" as the master form. To do that I set the link properties to:

Link Master Fields = "GroupID"
Link Child Fields = "GroupID"

This works perfectly fine! Now I wanted to take it a step further and add another link so now I have this:

Link Master Fields = "GroupID;LastName"
Link Child Fields = "GroupID;LastName"

Now what (I figured) Access does is show me the records where the "GroupID fields match AND where the LastName fields match". But what I really wanted was that it displays the records where the "GroupID fields match OR where the LastName fields match".

Can anybody suggest something?

Thanks
Luke

View 3 Replies View Related

Cloning Records From A Form With Subforms

Apr 3, 2006

Hi,

Can someone help me with this... I've got a main form with 6 subforms. The main form is associated with the "one-side" table. Each subform is associated with its own "many-side" table. What I would like to do is be able to click a button on the main form to make a copy of the record and all associated records in the "many-side" tables, but obviously with the new records having a different primary key. What is the best way to go about doing this?

Thanks!

View 7 Replies View Related

Linking Subforms 2 Issues 1 Topic

Aug 6, 2006

I have found a lot of answers here to my multitude of questions. However, I am having two final issues. Both happen to be in my subforms.

Issue 1
I have a subform called Student addClass Subform and in the ON CLICK event of the save buttom it runs the following code

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
[Forms]![Student_Classes_Subform].Requery

It Should requery a subform called Student_Classes_Subform which is in a main form called Students however it constantly tells me that is can't find that subform. I had this working before and made a few changes while working on issue 2 and some how messed it up and can't figured out what I did. Please Help!!!

Issue 2
In my main form called Students I have a 2 subforms that I need to link in the ON CURRENT EVENT I want to link Student_Classes_Subform to
Student ClassNTinfo Subform. Currently there is a relationship between the fields NT_ID. I assume that I need to pass a variable out of one subform to the main form and then back into my other subform. For the life of me I can't figure out how this works since the data is coming from two different tables. All of the examples I have scene pull from one table. Any help is great!

P.S. I am attaching the database and linked tables that will help where my explanation didn't.

Cheers
-andy

View 10 Replies View Related

Confused: Main Form, Subforms And New Records

Feb 23, 2006

Hi All,

I’m hoping someone can help a very confused newbie :confused:

While I have knowledge in using MSAccess I can honestly say I am well and truly stuck. I have searched the forum, but cannot find anything to help me out … if there is anything I am sorry for re-posting. While there may be helpful responses, they mostly involve code, which I do not know.

I have a Main Form (frmPreApprovedTravel) and numerous Subforms (sfrmFlightRail, sfrmHotel, etc). I have designed my Main Form with tabs and each tab contains staff details, flight, hotel, taxi, etc information.

My problem is that when I go to the next record in my Main Form I want the Subforms (all of them) to go to the next record as well. I know this is possible but having tried to figure it out myself for the last 2 hours, but know I’m still missing something!

I would appreciate any help and thank you in advance for the help and taking the time to read my problem.

View 3 Replies View Related

Button On Main Form To Change Records Of All Subforms In Sync

Aug 29, 2012

I have a main form and four subforms all of which were created from the tables without queries. The main form pulls employees personal data (never changes). The subforms pull Events attended, Lodging at the event, Family that attended the event and Employee minutia which changes per event. I'd like to have a button on the main form that changes the records in view for all of the subforms at once. This way it is easier for the users and I know that I am view all the pertainent info for event A instead of viewing event A's lodging info with event B's family info.

View 3 Replies View Related

Forms :: Records Total On Main Form From Subforms - Run Time Error 2450

Apr 24, 2013

Trying to get a total on main form from records from two subforms.

I'm coming up with Run-Time error 2450 Microsoft Access cannot find the referenced form 'tblitemlist subform'.

View 3 Replies View Related

Forms :: Prevent Duplicate Records From A Form?

Nov 12, 2013

Im trying to prevent duplicate records based on a PO # (RA_PO_Nbr), entered from a form. I'm trying to throw a 3022 error when the user attempts to enter a record that already exists, but I dont necessarily have to do it this way.

Code:
Private Sub cmdSubmit_Click()
On Error GoTo cmdSubmit_Click_Error
Dim db As Database
Dim rst As DAO.Recordset
Dim strSQL As String
strSQL = "CompanyPOTable"

[code]....

View 7 Replies View Related

How To Link Subforms To Other Subforms On An Unbound Form

Feb 4, 2006

I forum could someone tell me:

I have an unbound form on that form I want to put three sub forms one on a products table the other on a course start dates table and the link table that joins the other two together. all three are related to each other with Pk/FK links.

When I try to link them it says you cannot link items on an unbound form.

regards in advance
Peter:eek:

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved