Opinions On Master/Child Relationships

May 3, 2005

Hi,

We all know we're not supposed to duplicate data right? So was wondering how people deal with the deletion of Master records.

For instance let's say I have 3 tables.
tblSales
tblSalesSub
tblProducts

tblSales - lists the sales summary - stuff like SaleId, SaleDate, SaleTotal
tblSalesSub - lists the products contained within the sale.
tblProducts - is the Master list of products storing the product specifics

Now to prevent duplication of data I should just store the productId in tblSalesSub then reference that to tblProducts with an innner JOIN of some kind.
But what if the Master record gets deleted? The reference is broken and NULL values are returned.

How do you deal with this?
Don't allow deletion of these records?But just hide them when deleted?
Duplicate data by storing the product title and description within tblSalesSub?
Tell the user - tough cheese you shouldn't have deleted it should you?
Any other ideas?

Dan

View Replies


ADVERTISEMENT

Child/Master Problem

Feb 10, 2005

HI everyone, I have a Sales Invoice form with a Receipts subform showing what receipts have been lodged against that invoice. It works fine as long as there is one receipt or more.

The problem is when no receipts have been lodged and there are no receipts to show in the subform. When I open the Sales invoice form I get a "you entered an expression with no value" error, then the Sales invoice form opens. I tried suppressing the warning with DoCmd.SetWarning False, but that hasn't worked.

Anyone know a workaround?

View 2 Replies View Related

Forms :: Subforms Master / Child Link

Apr 9, 2015

I am building a user creation form. I have built it with 3 subforms

Subform 1 is voor general information about the user.
Subform 2 is some more specific information about the user
Subform 3 is more info about the same user.

Now when I create a user (record) in subform 1 it gets the primary key lets say 14. Then when i add information in subform 2. I want it to grab the Primary key 14 from subform 1. So that the information which is inputted in subform 2 will be related to information from subform 1. I get it working if I make a Main form and then put subform 2 and 3 in a subform and then let them grab the primary key from the main form. But how does this work with 3 subforms and no mainform.

View 3 Replies View Related

Link Parent To Child In Master And Subform

Aug 28, 2013

When trying to link parent to child in master and subform, I am getting a pop-up:

Subform Field Linker
"Object variable or With block variable not set"

View 3 Replies View Related

Forms :: M2M / Master Child Form Design - Trigger Event?

Oct 14, 2013

How to structure some MS Access 2007 Forms for the following scenario.

My table structure is as follows:

Product
++++++
ID (pk)
ProductName
...

Tag
++++
ID (pk)
TagName

ProductTag
+++++++++
ProductID (fk)
TagID (fk)

I want to have a main form that allows me to search for and displays a list of all products (and the dozen or so attributes for each product) that meet that criteria (I'm thinking a continuous form view of products).

So far so good. No problems.

Now I want a "tagging" form to the right of my continuous forms product list that is linked to the product which currently has focus. The tag panel should always show a complete list of all Tags. I want a checkbox next to each tag that I can switch on and off whether that tag applies to the currently selected Product. I also want to be able to add tags on the fly (without leaving the main form).

I think I have three forms in play :

Main Form
Product Form (subform to Main) my product search criteria is probably on this form header.
Tag Form (also subform to Main)

But with this approach I'm have trouble linking the two sub forms to each other. Actually, I'm having huge trouble figuring out how to display the list of all tags with a check box that when checked on and off creates / deletes a record in the ProductTag table and I really want Access to do as much of the CRUD as possible. I would prefer to avoid writing screeds of SQL INSERTS/DELETES on events. Am I asking too much of Access?

View 1 Replies View Related

Forms :: Date Ranges - Using Child / Master Fields For Creating Filter

Oct 7, 2013

I have a form which I am using child/master fields to create a filter (see attached pic)

For the date ranges I need these to be

>= Start Date and <= Actual Finish Date

How can I set the criteria for these two fields, so that when someone picks a date it knows it's from or before the date entered.

View 14 Replies View Related

Forms :: Navigation Combobox Ignoring Subform Master-child Relationship?

Jun 17, 2015

I have a form, frmProjects, with a continuous subform, sfrPeopleOnThisProject. They have a master-child relationship. The form shows one Project record at a time, while the subform shows all the People records for that project. This works as expected - the correct records show up in the subform as you move through the form records.

To make it easier to glance through the list of subform records (as they can sometimes be quite long), I've added a navigation combobox to the header of the subform. If I understand correctly, as the combobox is within the subform, it should obey the master-child relationship: it should only show the subform records associated with the main form's current record. It does not. Instead, the combo box collects *all* of the records from the table that the subform is based on. So, choose the record for Project 1 in the main form. Up pops the 2 people on Project 1, but the combo box lists both the 2 people on Project 1 and the 3 people on Project 2.

The row source for the subform combo box is:

SELECT tblPersonOnProject.PersonOnProjectID, tblPerson.Fullname FROM tblPersonOnProject INNER JOIN tblPerson ON tblPersonOnProject.PersonFK=tblPerson.PersonID ORDER BY Fullname;

I can make the combo box perform as required by adding "WHERE Project=Forms!frmProject!ProjectID" to the row source and placing a hidden textbox on the main form for ProjectID (the autogenerated primary key) to sit. Have I misunderstood the point of the master-child relationship in the subform? This hidden textbox thing can't be correct.

View 2 Replies View Related

Subform In A Form Doesn Show Controls When Link Child And Master Fields Derfined

Jun 13, 2005

Hello,

I have a form and a subform in MS Access 2003. I have made some changes to database structure, so I decided to change the subform also. When I changed the Link child and link master fields, the controls of the subdatasheet dissapear- they show only in design view. If I clear the contents of Link child and link master fields they appear again, but the records are not binded.
Is there a setting on the parent form that also has to be changed, to make the new binding?

Thanks,
Aleksander

View 1 Replies View Related

Parent/child Relationships

Oct 12, 2006

Hi all

I seem to be having a problem with acess 2003 in that when ever I set the parent/child relationships and go back to the front end the simple disappear?

any thoughts would be grate

Thanks

James

View 1 Replies View Related

Forms :: Display Some Fields From Master Table And Only Last Entry From Child Table

Jul 1, 2013

I have 2 tables, master & child. with a one to many relationship.

On one of my forms I want to display some of the fields from the master table and only the last entry from my child table.

How would i accomplish this?

View 5 Replies View Related

Tables :: Add A New Child Record When Master Record Is Created?

Dec 21, 2012

I have a master table with about 40 fields. In addition, I created eight child tables with read only datasheet views of limited fields from the master table. The child table views are based on certain critera in the master table and are being refreshed by using delete and append queries tied to the On Current property of a form. By double-clicking a specific child record, a form is opened to allow editing of the master record. Also, I am using Referential Integrity and Cascade Update Related Fields to update the child table when a change is made to the master. However, I do not know how to add a record to one or more child tables when a record is added to the master table. The new child record would have to be based on the same critera that the append queries use so it gets added to the correct child table or tables.

View 5 Replies View Related

Thanks For The Help, Now Opinions Welcome.

Mar 21, 2007

I'd like to say thank you to those who helped me with questions I had on my database. Even though some of you didn't even realize that you helped. Searching the forum yields answers to many questions.

So now that the database is complete, I'd like opinions. I'm attaching it as a zip file.
A couple of notes. I forgot to remove the database password so it's "fornax".
Also, being that I work for a very large hospital I cleared out my table and removed the logos.
I hid the menus and disabled the F11 key, but there is a hidden button on the far right of the footer. A double-click will restore the menus. Also try clicking on the logo--or it's place holder.

View 8 Replies View Related

Need Opinions

Jan 28, 2006

Okay, as mentioned in another thread, I was given a huge project involving MS Access. I need some opinions on what to do for this situation, and here's the situation. So far, unless suggested a better idea, I'm going to have two databases. One database will be the final version, the other will if I want to make additions, changes, etc. They will contain the same data as users will only be using one and a relationship between the two will be created. I can't remember how to do it, but I remember there was a way to prevent users from changing anything about the Access file with the exeption of what the form and the vb code allows. I plan on creating some type of login using vb. The only access to the database I want users to have is what options the forms I create give them. Please give your opinions/suggestions so I can figure out what to do.

Thanks much,

jmh

View 14 Replies View Related

Opinions On Security

Dec 5, 2007

I have very painstakingly worked out a new database and I'm about to present it to the departments who will be using it. At various times words like 'password' and 'locked' have been thrown out but as of now I have not implemented any security measures. I started reading up on the topic this morning and the general consensus seems to be that unless there is a sincere need for them the security process is excruciating.
Does anyone have specific advice or opinions on access security? If I were to do anything, I think it would be to set up working groups only allowing users access to the parts of the database they are concerned with.

I would love any opinions or advice from people with experience of this on if I should recommend such measures or try to steer the department away from them.

View 6 Replies View Related

Need Expert Opinions

Jan 9, 2008

I work for a property management compnay and they have put me in charge of coming up with a way to go some what paperless. What they are wanting is a way to enter a work order for a particular client (i.e description of work to be done for maintenance). This would then need to be printed in a report to be faxed over to the workers. This info would then need to be pulled out and placed into an invoice where, where items could be entered such as items bought ets.

My company is willing to spend thousands for software, but I think it is insane. to do so.

I was thinking that surely this could be done in access. I have an understanding of how access works (forms, reports, tables, etc.) but I have never designed one like this.

It does not have to be complex and it does not have to have a lot of formulas, I was thinking that the total could be placed in field when the invoice info is entered. Only really calculation would be adding the total of the items.

Anyway is this something that can be done relatively easily by someone with my experience, or is this to complex.

Thank You for your time

View 1 Replies View Related

Table Opinions Please...

Jan 29, 2008

Main table about 3000 customers with 18 fields
Will input payments for each customer monthly and / or quarterly total about 12,000 per year.
Plan to purge payments over 18 months old frequently.
1) Put it all in one table or break into two ?
2) As far as db size wise and efficiency, would it really matter ?

Thanks in advance.

View 14 Replies View Related

Opinions On Best Way To Prevent Duplicate Data

Dec 1, 2006

Hi all: I currently have a database with a list of clients, and it is to be accessible to others to enter information on clients and to add new ones. However, I want to make it so that the user who wants to add a client can easily search the database for that particular client so that they won't enter a duplicate.

I have created a search function on my form, but then it occurred to me: what if there are two people with the same last name's? At first, I wanted a search operation to display a list of client names, along with their respective ID numbers and possibly a link next to each that would take the user to the corresponding record.

However, I have no idea how to do this, and I'm unsure as to whether or not this is the best way to tackle the problem. Please, someone show me the way!

View 7 Replies View Related

Machine Status Monitor Suitability Opinions

Mar 23, 2006

Am fairly certain that I will be asked to design and implement a Machine Status Application.

Description below is very simplistic but believe you will get the idea

Basically simple stuff at Machine Operator. He clicks a command button on a display that signifies machine is okay or not. This updates machine status. Image it just toggles between Running and Stopped.

Each minute little process runs to at 1 to Run value or to Stop value. Okay so this will get a little more complex for sure.

Now I could end up collecting data on say 100 machines. Okay so I would not expect the status change to occur any more than once per hour on average so it would be a bit like having 100 very very slow users on the system.
Now the crunch. What effect (if any) would these 100 very very slow users have on performance and particularly the One much quicker user who is executing preset queries one after another for say 20 seconds every minute.

Thoughts and opinions welcome

Len

View 4 Replies View Related

Switchboard To Child Forms

Aug 13, 2006

Hello All,

I am trying to make a small database that just help users to enter there data. I am using a switchboard here. User should click on his name (Captions)and the switchboard should close and automatically user name should appear in a text box in child form.
I hope I will get an amicable responce.

With Best Regards
Yqureshi80

View 1 Replies View Related

Youngest Child Of Parents With More Than One

Nov 9, 2006

Parents can have one or more children. I want to return the youngest child of those parents with more than one child.I have [QryParent&children] that returns all the parents and all the children. I have used this as a sub query in [QryParents>1child]. This uses "In (SELECT [ParentsId] FROM [QryParent&children] As Tmp GROUP BY [ParentsId] HAVING Count(*)>1 )" as the criteria in the ParentId. This returns all parents with more than one child and gives the name and DOB of the child.I now want to return just the youngest child for each parent.An ideas?

View 1 Replies View Related

Master Query

Feb 10, 2008

Dear all,

I have a table "Project Master Code", contains: Project code, Cost Code, Description, Budget Amount, Total Purchase, Left to Complete.

For each project, we enter all above field except Total Purchase. Total Purchase to be taken from Transaction table.

What I want is that, I want to creat a query based on Project Master Code table. I will call all field from Project Master Code and in Total Purchase column I want all Purchase from Transaction table.on based of Project Code & Cost Code.

thanks

mithani

View 14 Replies View Related

Looking For A Master Event..

Aug 4, 2005

Hi there,

Is there an event for a form object, which is triggered whenever any control in that form is changed/altered?

I have tried the suspect looking ones, but to no avail.

Thanks!

View 1 Replies View Related

Parent-Child Cascading Deletes

Nov 4, 2007

I have a simple Family table:

PersonID
Name
ParentID

where, in the case of a child, its ParentID contains the PersonID of its parent.
In the Relataionships window I put two such tables, Family and Family_1 and I joined Family.ParentID to Family_1.PersonID. I set referential integrity, cascading updates and cascade deletes.
I made a Parents form (by setting the ParentID criteria to Is Null), and added a Children subform (linking the ParentID of the subform to the PersonID of the main form).

The cascading updates works when I add a new child but when I try to delete a parent I get the error: Could not update; currently locked.
Why doesn't the cascade delete work?

View 3 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

Child Form Loads Before Parent?

Jan 26, 2006

Hi,

I've got a parent/sub-form set up, both of which derive their data from linked tables connecting to a central database. As a result I've had to add coding to the NewRecord events to fetch the next primary keys from the database.

Unfortunately I'm finding that one loading the new record, the child form seems to be loading before the parent, ie the child form_Current event occurs before the parent form_Current event. Is this how it should be? It seems intuitive that the parent should load first.

I'm sure I can develop some cunning logic to get around this problem but I'm sure there must be a better way. Has anyone any experience of this parent/child set-up with linked, central database tables?

thanks!

Dave

View 5 Replies View Related

Display Field From Child Table

Oct 21, 2006

I hv a relationship as follows:

Person 1 ------- N Assignment

Person
(PersonID, lastName, firstName...)

Assignment
(AssignmentID, PersonID, AssignmentDate, Score)

I would like to show the Score of the latest assignment in the Person Form, how can I do it?

Thx in advance!!

View 1 Replies View Related







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