Hi Jeff, thanks for popping in!
Unfortunately, where I live, there are no other consultants to hire, I'm
it!!
The database is for tree planters. Planters receive a specified amount per
tree planted, based on the project, the terrain and the type of tree.
First the user selects the project and the planting areas. fsubDailyBoxes
basically keeps track of the trees planted per employee in that selected
block. fsubEmpPay is not a subform of fsubDailyBoxes, it resides on the main
form since a continuous sub can not have a sub. It is related via the main
form Project ID as well as the EmpID and Date from fsubDailyBoxes. If an
employee has planted a tree, it is assumed that they have shown up to work
either for a full or half day. The camp managers do not want to have to go
to a separate form to enter the planters attendance, as they do with the
other employee types.
In the OnChange event of my employee combo box, I have a simple requery
statement that requery's fsubEmpPay so that the correct employee is
selected. I also have the same requery in the OnCurrent of my main form so
that when I move between employees it shows their correct full/half day pay.
So, what I would like to happen is this: When an employee is selected and
planting data is entered on fsubDailyBoxes, I would like fsubEmpPay to
recognize that fact and save the employees day pay. (Full Day is selected as
a default).
I mean I could have no default and make them select either full or half but
I know that they are going to ask for it anyway.
I hope that's enough info.

Signature
Thanks for taking the time!
CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
> Since most of the folks offering suggestions here are volunteering their
> time, you might want to consider hiring someone if you are under a tight
[quoted text clipped - 35 lines]
>>
>> Can somebody please fill me in on the details!
Jeff Boyce - 26 Mar 2008 15:36 GMT
I'm a little stacked-up right now, so I'll take a look a little later this
morning and offer my ideas. Perhaps one of the other newsgroup
readers/volunteers will have more time right away.
With this marvelous invention we're using (the Internet), it's possible to
have and support customers in different time zones (and different
countries!) without having to live in the same town... (personal experience
speaking!).
Good luck!
Regards
Jeff Boyce
Microsoft Office/Access MVP
> Hi Jeff, thanks for popping in!
>
[quoted text clipped - 72 lines]
>>>
>>> Can somebody please fill me in on the details!
Jeff Boyce - 27 Mar 2008 19:39 GMT
I took another look and I'm still having trouble visualizing the table
structure.
You've described how the form and subforms are supposed to look/work, but
forms are just glimpses of the underlying data.
Please post back with a more complete description of the data structure,
rather than the form design.
Thanks.
Regards
Jeff Boyce
Microsoft Office/Access MVP
> Hi Jeff, thanks for popping in!
>
[quoted text clipped - 72 lines]
>>>
>>> Can somebody please fill me in on the details!
CJ - 27 Mar 2008 22:45 GMT
Hi Jeff
Well, to give it a go in it's simplest terms.....the key tables involved
here are:
tblProjects keeps track of the client and overall project info
tblBlocks keeps track of the planting areas for the project
tblProjectStaff is a list of the crew selected for this project
tblDailyBoxes is a list of what each person planted on a particular day
tblCampCosts is a payroll table listing each staff persons attendance and
camp expenses for each day.
frmDailyMain based on tblProjects is the Main form
fsubBlockTU is the first subform showing which Block and Terrain area was
selected
fsubDailyBoxes is a subform on fsubBlockTU. It is based on a query that
allows me to select the employee, date, tree species,
number of boxes planted and rate per tree
fsubEmpPay is also a subform on fsubBlockTU. It is based on tblCampCosts and
allows me to match the employee ID, date and select either a full or half
day of pay.
Everything works fine relationship wise and the data integrity is sound. I'm
just lacking in the VB end of things. I was thinking that I had used some
code in a different database that ensures that a value is selected and
forces saving a record on a different related form. I just can't find (or
remember) the code. I thought it was pretty simple but perhaps that was a
pipe dream......

Signature
Thanks for taking the time!
CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
>I took another look and I'm still having trouble visualizing the table
>structure.
[quoted text clipped - 88 lines]
>>>>
>>>> Can somebody please fill me in on the details!
Jeff Boyce - 28 Mar 2008 22:38 GMT
OK, that helps me see a bit of the bigger picture.
You had mentioned that you have a subform that is related to the Project
(from the Main form) and to an Employee (from another subform). How have
you "related" these? It sounds like you know about using a main
form/subform relationship (parent/child field(s)), but how are you reaching
into the other subform to relate?
Regards
Jeff Boyce
Microsoft Office/Access MVP
> Hi Jeff
>
[quoted text clipped - 118 lines]
>>>>>
>>>>> Can somebody please fill me in on the details!
CJ - 29 Mar 2008 19:40 GMT
fsubBlockTU is related to frmDailyMain via lngBlockID in both Child and
Master (This is where I select the planting block for the Project)
fsubDailyBoxes is related to fsubBlockTU via lngBlockAreaID in both Child
and Master (Selection of the terrain area within the block)
fsubEmpPay is related with lngProjID;lngEmpID;dtmDate in the Child and
[Forms]![frmDailyMain]![lngProjectID];[Forms]![frmDailyMain]![fsubBlockTU]![fsubDailyBoxes]![lngEmpID];[Forms]![frmDailyMain]![fsubBlockTU]![fsubDailyBoxes]![dtmDate]
in the Master (The correct Project, Employee and Date. The block location
does not matter for the days pay and can be retrieved via the fsubDailyBoxes
anyway)
HTH

Signature
Thanks for taking the time!
CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
> OK, that helps me see a bit of the bigger picture.
>
[quoted text clipped - 131 lines]
>>>>>>
>>>>>> Can somebody please fill me in on the details!
Jeff Boyce - 31 Mar 2008 16:48 GMT
Whoops! I got lost again.
Are you saying you have a subform and a subsubform? I (?mis-)understood you
to describe one main form with two subforms.
Regards
Jeff Boyce
Microsoft Office/Access MVP
> fsubBlockTU is related to frmDailyMain via lngBlockID in both Child and
> Master (This is where I select the planting block for the Project)
[quoted text clipped - 147 lines]
>>>>>>>
>>>>>>> Can somebody please fill me in on the details!
CJ - 01 Apr 2008 03:16 GMT
Sorry, it is one main with two subs. fsubEmpPay is sitting on (in?)
fsubBlockTU and is related as below.

Signature
Thanks for taking the time!
CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
> Whoops! I got lost again.
>
[quoted text clipped - 159 lines]
>>>>>>>>
>>>>>>>> Can somebody please fill me in on the details!
Jeff Boyce - 01 Apr 2008 16:08 GMT
I'm still not visualizing your situation. Perhaps it's a matter of
semantics.
A "subform" is dependent on its parent form. Please describe the "parents"
and "children" forms you are working with.
I can't tell if you have one parent with two children, or a parent, a child,
and a grandchild.
Regards
Jeff Boyce
Microsoft Office/Access MVP
> Sorry, it is one main with two subs. fsubEmpPay is sitting on (in?)
> fsubBlockTU and is related as below.
[quoted text clipped - 163 lines]
>>>>>>>>>
>>>>>>>>> Can somebody please fill me in on the details!
CJ - 01 Apr 2008 19:57 GMT
Hello again.
frmDailyMain is the parent
fsubBlockTU is the child
fsubDailyBoxes and fsubEmpPay are both grandchildren, there are no Great
Grandchildren.
As I mentioned in my second post, I would love to make fsubEmpPay a Great
Grandchild but fsubDailyBoxes is a continuous subform (and needs to stay that
way) and cannot have a sub.
Therefore, I needed to manipulate the Child/Master relationship of
fsubEmpPay so that it would recognize the correct employee and date from
fsubDailyBoxes.

Signature
Thanks for the brainwaves!
CJ
I blame the parents........
> I'm still not visualizing your situation. Perhaps it's a matter of
> semantics.
[quoted text clipped - 177 lines]
> >>>>>>>>>
> >>>>>>>>> Can somebody please fill me in on the details!
CJ - 01 Apr 2008 19:58 GMT
Hello again.
frmDailyMain is the parent
fsubBlockTU is the child
fsubDailyBoxes and fsubEmpPay are both grandchildren, there are no Great
Grandchildren.
As I mentioned in my second post, I would love to make fsubEmpPay a Great
Grandchild but fsubDailyBoxes is a continuous subform (and needs to stay that
way) and cannot have a sub.
Therefore, I needed to manipulate the Child/Master relationship of
fsubEmpPay so that it would recognize the correct employee and date from
fsubDailyBoxes.

Signature
Thanks for the brainwaves!
CJ
I blame the parents........
> I'm still not visualizing your situation. Perhaps it's a matter of
> semantics.
[quoted text clipped - 177 lines]
> >>>>>>>>>
> >>>>>>>>> Can somebody please fill me in on the details!