Solved

Nested one to many forms

Posted on 1997-08-09
4
313 Views
Last Modified: 2008-03-03
I'm trying to put toghether a data entry form that uses nested one to many form/subforms.
 
The structure is Each location has many dates and each location/date has many parameters and values.

The outermost form would simply consist of location.  Inside this would be a date subform and inside of this would be the list of parameters entry fields.

The idea is that you would select location then select date and then the data for that location/date would appear for entry or editing.  

I've got something close to what I want.  It works if all the data is entered at once, however, if data is entered at different times it doesn't save for that location/date it creates another record for that location/date.

I'm not sure if I'm explaining this very well.

Any ideas?
0
Comment
Question by:tmort
4 Comments
 

Expert Comment

by:baskomurcu
ID: 1955550
First of all which version of Access are you using? I tried a form the way you described and couldn't find any problem. Can you send me a copy of the form to Ali.Baskomurcu@datem.com.tr and describe your program with an example.
0
 

Expert Comment

by:wrussell051197
ID: 1955551
Hmm, not sure if I completely understand your problem... The data has to be entered from the outermost form inward, otherwise there will not be a record created. You can get around this by putting an autonumber field in the tables bound to the outer two forms and using those as your Master, child fields. Let me know if that helps...
0
 
LVL 1

Expert Comment

by:danielmarkus
ID: 1955552
It sounds verry complicated. I think I can help you if you explain something about the relation between the location table and the location/date and the date table or any other tables that might be involved.

Perhaps you can also send a copy of the form and the tables and queries that are involved



0
 

Accepted Solution

by:
ProgPlus earned 100 total points
ID: 1955553
There are two parts to the answer:
1) Access accommodates a maximum of 3 levels of subform depth.
2) You don't have to use a subform to have one field limit the contents of another.  From your description, it sounds like your Date field doesn't need a subform of its own--it can be on the same form as your initial Location field.  To limit the Date field, base it on a query that looks at the Location field as one of its parameters.  To make the Date field update, add an AfterUpdate event to the Location field, and in it put a line like this:

Me!DateFieldName.requery
Me!DateFieldName.setfocus

Hope this helps.

0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question