Hi,
I'm a new user here and new Access user, but have used this wonderful site as a resource.
My question concerns the structure of my database. I'm doing a simple db which collects data on clients, specifically visit and consult times. I have a main form with basic client info. I then have two sub-forms, linked to the master form by client number, with specific information on visits and consults. (a) The first subform concerns consult times (b) The second one contains a second set of times.
Before I go forward, I'm wondering if structurally, there is any reason to have two sub-forms rather than one.
I am also performing calculations in the sub-forms. In subform (b), they work fine (I used a string).
In subform (a), however, I need a piece of information from subform (b) to do the calculation. I don't know how to get that piece of information (a general date and time) over to subform (a). If I try to put in the control source equation =ElapsedTimeString([ConsultRequested],[OrdersWritten]) I get an error. The reason is because [ConsultRequested] is from subform (b).
If I try to put in instead something like [Conslt_Tblsubform]![ConsultRequested] it also doesn't work. (I'm sure that last bit is totally wrong.)
So, should I just have one sub-form, which would probably solve the problem?
Also, this is an unbound calculation. I did also try to write a SetValue macro which would save this to a table. However, if I need to run reports or make charts with averages, isn't it better to just do the calculations then and there, rather than save them to the table?
I realize that my questions may be a bit unclear and I apologize. This is a first for me.
Thanks in advance and please let me know if I need to clarify.
I'm a new user here and new Access user, but have used this wonderful site as a resource.
My question concerns the structure of my database. I'm doing a simple db which collects data on clients, specifically visit and consult times. I have a main form with basic client info. I then have two sub-forms, linked to the master form by client number, with specific information on visits and consults. (a) The first subform concerns consult times (b) The second one contains a second set of times.
Before I go forward, I'm wondering if structurally, there is any reason to have two sub-forms rather than one.
I am also performing calculations in the sub-forms. In subform (b), they work fine (I used a string).
In subform (a), however, I need a piece of information from subform (b) to do the calculation. I don't know how to get that piece of information (a general date and time) over to subform (a). If I try to put in the control source equation =ElapsedTimeString([ConsultRequested],[OrdersWritten]) I get an error. The reason is because [ConsultRequested] is from subform (b).
If I try to put in instead something like [Conslt_Tblsubform]![ConsultRequested] it also doesn't work. (I'm sure that last bit is totally wrong.)
So, should I just have one sub-form, which would probably solve the problem?
Also, this is an unbound calculation. I did also try to write a SetValue macro which would save this to a table. However, if I need to run reports or make charts with averages, isn't it better to just do the calculations then and there, rather than save them to the table?
I realize that my questions may be a bit unclear and I apologize. This is a first for me.
Thanks in advance and please let me know if I need to clarify.
Last edited: