Please Help with nested subform

  • Thread starter Thread starter Deena
  • Start date Start date
D

Deena

I have a main form (Main) with a subform (Log). (Log)
also has a subform (Notes).
(Notes)has 3 fields that are linked to its Parent, and
one field that requires entry (Desc). The (Notes) subform
also has a command button that will print a report and
close the (Main) form. If a user leaves the (Log)
subform by clicking on the command button of the (Notes)
subform, no record is saved for the (Notes) table.
I have tried via a Macro from the on click event of the
command button to go to the (Desc) control and require
entry without success.
I know there is a special way to reference a subform and
I have done that successfully referencing (Log) subform.
How do I reference (Notes) which is a subform of a
subform.
 
-----Original Message-----
I have a main form (Main) with a subform (Log). (Log)
also has a subform (Notes).
(Notes)has 3 fields that are linked to its Parent, and
one field that requires entry (Desc). The (Notes) subform
also has a command button that will print a report and
close the (Main) form. If a user leaves the (Log)
subform by clicking on the command button of the (Notes)
subform, no record is saved for the (Notes) table.
I have tried via a Macro from the on click event of the
command button to go to the (Desc) control and require
entry without success.
I know there is a special way to reference a subform and
I have done that successfully referencing (Log) subform.
How do I reference (Notes) which is a subform of a
subform.
.
Hi Deena,
if all you are wanting is to ensure that data is entered
into the Desc control, have you tried checking this as
part of the command button event? for example...

private sub command1_OnClick()
if isnull(Desc) then
msg "please enter a description",vbexclamation,"I can
see you"
desc.setfocus
else
close
end if
end sub

Luck
Jonathan
 
Back
Top