>Hello Newsgroup. I have a dilemma regarding referencing a subform to a
>subform in an expression. Below is the expression and it is not working
[quoted text clipped - 7 lines]
>
>.... John
Shane, thanks for the info but it didn't. I'll see if I can clarify, the
main form has 2 subforms on it (Sub1 & Sub2 for simplicity). Sub1 is the
many to the one of the main form and Sub2 is the many to the on of Sub1.
Sub2 has the txtbox on it that is counting how many in Sub2 there are that
match the one in Sub1. I got to this but it still isn't working like it
should. The ID and tbl are for Sub2 and the criteria is for Sub1.
=DSum("[VehicleMaintenanceCommentID]","[tblVehicleMaintenanceComment]","[VehicleMaintenanceID]='Form!Sub1!VehicleMaintenanceID'")
So if you or any others know how it should be, thanks, because I am at a
loss. It is the criteria part of the expression
... John
> Hey John,
>
[quoted text clipped - 16 lines]
> >
> >.... John
shanesullaway - 30 Sep 2007 06:35 GMT
John,
I hope I'm following you correctly so here goes a stab at it. (criteria part
only since thats all you need help on)
"[VehicleMaintainceID] = " & Forms![MainFormName]![subform1].Form!
[VehicleMaintenanceID] (this is assuming VehicleMaintenanceID is a number)
HTH,
Shane
>Shane, thanks for the info but it didn't. I'll see if I can clarify, the
>main form has 2 subforms on it (Sub1 & Sub2 for simplicity). Sub1 is the
[quoted text clipped - 15 lines]
>> >
>> >.... John