I have a subform called "HOME Building Subfrom" in this form I have a command button that prints a report based on the current record and when I Veiw the form by itself it works perfect. When the form is open with the main form the print report function doesn't work.
The code I used on the on click is:
Docmd.openreport "HOME Buildings",acprint,,"[HOME Buildings]![BuildingNumber] = [Forms]![HOME Building subform]![BuildingNumber]"
Alexander Jorge
City of Miami
Information System Analyst
![[pc] [pc] [pc]](/data/assets/smilies/pc.gif)
The code I used on the on click is:
Docmd.openreport "HOME Buildings",acprint,,"[HOME Buildings]![BuildingNumber] = [Forms]![HOME Building subform]![BuildingNumber]"
Alexander Jorge
City of Miami
Information System Analyst
![[pc] [pc] [pc]](/data/assets/smilies/pc.gif)