Need some serious form managment help

Zaeed

Registered Annoyance
Local time
Tomorrow, 01:29
Joined
Dec 12, 2007
Messages
383
Ok, my head is spinning from trying to figure this out. I dont think its that difficult, its just that there is that much going on that i've lost track and need a bit of help.. :confused:
____________________________

My form is made up of a header, the detail, and two subforms. This main form represents all the information relating to a Project. The form itself is unbound.

The subforms are bound to thier master tables (Task table and Impact table) if the form is being used to modify an existing record. If the form is being used to create a record, I have two temp tables which the subforms are bound to. The rest of the form is loaded from its respective table. Both the subforms display multiple records using Continuous Forms.

At the moment, if I am modifying a current Project, and make a change to one of the records on the Task subform, a message appears asking if I wish to save the change, through the use of the Dirty command. It does this for every record that is changed, and does the same thing for the Impact table. If Yes is selected, then the master table is updated.

If I then click Cancel on the main form, any changes made and saved on the subforms are not undone, so this is something I need to change.

My main concern is when modifying a Project, not when creating one.

What I need to work out is a method to save the entire form in one go, or undo changes made if I hit cancel.
__________________________

To spice it up, when a Project is submitted, it needs to be Approved before it is allowed to begin. I have the approval process worked out, however, if one of the approvers makes a change to the Project, the form needs to be aware of this so that it can reset the approval process.

So basically if the Project is changed, the form needs to know, and then do what it needs to do.
____________________________

Both the red points are related, I know, so solving one will probably lead to solving the other. I realise this my be trivial, I think i've may have just overwhelmed myself.
____________________________

Some ideas i've had:
- When loading a Project, copy all records that the subforms display into the temp tables already in place, and then if Save is clicked dump the contents of the temp table back into the master table. I am unsure how to handle the case where extra records were created. Would you perhaps do this: If changes are made and records added to the Task subform, delete all the records from the master Task table that correspond to the Project being modified, and then dump the contents of the temp table in.
____________________________

Any help on this would be a godsend, as I am at the point where I am just blankly staring at the monitor trying to figure out how to make it do what I want. :(
 
Ok.. I think I am begining to see the light..

Since each individual task and impact has its own unique ID I can use that to identify which record in the master table to update. Ok..

What if some records were modified and some were added. How would you handle this, since you could not simply do a SQL UPDATE on the table can you? In the temp table you would have both existing and new records.
 
hmmmmm...

At this point it would be too much drama to make the form bound.. Once I have it working I might make a copy which is modified.

Before begining this project I had only breifly looked at Access, and have done mainly Java/C programming, so the bound approach works well for me since the form does what I tell it to do, rather than what Access tells it to do. The main idea was to have it as stable as possible so that multiple people could work on the system at any one time. I was told that when using bound forms this became difficult and the restrictions of access in a multiuser system were quickly reached.
 
Last edited:
When updating the table from the temp table, I will have both new and old records. Would the best method of updating be to create a recordset based on the whole temp table, then cycle through each record and do an update or insert depending whether its PK exists?
 

Users who are viewing this thread

Back
Top Bottom