Long split table

Okay another case:
The user starts entering new data in form (A), form A is setup to open ready to except new data.

Once the user has entered all the data into form (A) a button marked “open form (B)” becomes active and the user can click on this button, this runs some code which extracts the ID from form (A) then opens form (B), fills in the ID Field with the ID gathered from form (A) the user that can enter all of the data in form (B) and now another button marked “open form (C)” becomes active and the user can click.... And so on.

Is that the sort of thing you’re after?
 
Yes. Exactly. This is what I want.
 
Right, the user is now on form (C), but hold on a minute, the user realises they made a mistake on form (B), how is the user going to go back and correct this mistake? Do you want a button to be made available to go back to the previous form?

Another problem, it’s coming up to home time, but the user is only halfway through the set of forms, they close down the database, in the morning they open the database expecting to start where they left off, how are you going to handle this situation?

Another instance, the user is halfway through the set of forms, and there’s a power cut, again how are you going to handle this situation?
 
There is no way to go back. With help of some forum members here, I created a code which checks if all the required fields are answered before proceeding to the next form [button_click() property].

It is going to be a study with patients who will be required to sit down for an hour on the computer station to enter data at a stretch.

If there's a power failure, well the only way would be to start over. I did think about it, but the chances of that happening are less.
 
I have identified some very simple problems which immediately sprang to mind, however I’m sure there will be many more problems that will crop up as you develop your database.

The point is these are individual unique new problems which would take myself and other experienced programmers time to solve, and to be honest I personally have no interest in solving these new problems created because you will not follow the advice you have been given, and that is to follow normal database programming practices.

By following normal database programming practices, you will of course find some quite difficult problems to solve, however the advantage here is they will be common problems that have been solved many times before.

There is some light at the end of the tunnel, there are a couple of “extreme programmers here” who love a challenge, who will hopefully wade in and help you sort out your problems, but as I said I’m not one of them! I was one once, I used to love a challenge like this, but I am a lot older and wiser now!
 
I can understand that. Could you give me some pointers in the right direction?
 
Please review this thread, the information has already been provided....
 
You need one table which stores the reference details, probably the person’s name, age, the date and the like.
Now on this form you have a tab control, I don’t think there’s a limit to the number of tabs you can have, however there may well be a limit to the number of sub forms you can have on a form, and I reckon forms on a Tab count as forms on a form, so it would be a good idea to find out the maximum number of sub forms you can have on a form. If you can have 22 or more them we’re in business!
 
I did try that once, The only problem was navigating b/w subforms on diff tabs

for eg:

Main form has tab1,tab2,tab3, etc
Each tab has just one subform. Like tab1 with subform1, tab2 with subform2, etc

When a user clicks on next button on subform1 (tab1), how can I direct access to go to subform2 on tab2?
 
The main form, the hosting form, this will provide a unique ID.

This ID will propagate down into your other tables through the sub forms.

So now instead of having individual forms that open the next form and so on, you will have all your forms on individual tabs on a tab control on your main form. (this is subject to the limit of the number of sub forms you are allowed to have)
 
Why can’t the user just click on the next Tab?
 
Before we go any further it is important to know if there is a limit to the number of sub forms, I suggest you open a sandbox database and create a form within it and then add at least 25 sub forms and see if it breaks. Alternatively you can try and find the information from access help, probably quicker to add the 25 sub forms I recon!
 
Because I'm dealing with impoverished patients in a very rough neighborhood. Some of them are 70+ and do not even know how to use a computer. We are going to have a student volunteer with us who will help them with entering the data but there will be 20 patients at a time and only one volunteer. :(
 
Alright... turns out that I can add all my subforms in a tab control. Here's an attached DB (in 2003) format. Look at "form1"

My only question now is: If you take a look at bottom of each subform, there is a button which opens the form (in its own window). Is there a way by which I can make this button focus on the next tab in the existing form?

If this is possible, I can manage the rest. I really appreciate all your help esp Uncle Gizmo. I know that this DB is not structured correctly but this is all I have right now. Will probably take some classes next summer for database design. :)

P.S. - As you can see in the DB, I added an ID section on each form in case no solution comes up. I'll probably have the study participants enter it manually on each screen.
 

Attachments

Is there a way by which I can make this button focus on the next tab in the existing form?


Me.tabcontrolname.Pages(x).SetFocus

(Where x is the index starting at zero for the first tab.)
 
As you can see in the DB, I added an ID section on each form in case no solution comes up. I'll probably have the study participants enter it manually on each screen.


I have not looked at the db but it sounds like you just need to set the MasterLinkFields and ChildLinkFields for the subformcontrols to the ID fields.
 
I know that this DB is not structured correctly

It is quite normal for databases not to be structured correctly; it’s my duty to tell you when your structure is incorrect, and to encourage you to adopt the correct structure.

In your particular case I can see that you have done a phenomenal amount of work already and I can understand your resistance to changing the structure.

You also indicate that you are only using access to gather the data and that you intend to transfer the results into another system and analyse it there.

For the above two reasons I think I have identified a route that will enable you to use your current design, this is to have a master control table which will store the details of the person answering the questions, using this master control table as the data source for your main form, and using sub forms, probably on a tab control to display the forms you already have for gathering the information into the tables you already have.

However there is one barrier to this working and that is there is (I think) a limit to the number of sub forms you can have on the main form. Before you proceed any further you must satisfy yourself at your version of access can handle the number of sub forms.

You could do this by either looking it up in the access help file, or as I suggested earlier add loads of sub forms to the main form and see what happens.

Note Added Later:
(I can now see you have done that in the 2003 sandbox DB, my screen resolution was "Hiding" the Tabs)
 
Last edited:
I have created a video http://www.youtube.com/watch?v=UGroqewWHzo which should help you get the main form set up.

You will then need to link the forms in the sub form windows as mentioned in a previous thread.

I lost the sound towards the end of the Vid, but I think it just about covers it.
 

Users who are viewing this thread

Back
Top Bottom