Solved

Nested one to many forms

Posted on 1997-08-09
4
308 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

791 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