Usng A2007 and A2003. I have a file with several forms. There are 3 different major forms for each type of device. Each of the three major forms is made up of single forms for a customer and quotation number for that device. The user screen is that same single form for customer and quotation. When the user wants to print the screen, I use code that I found on a website:
Me.NotWantedSubform.visible=False (also allows to avoid landscape format )
Dim PagePrt As Integer
PagePrt = 2 * Form.CurrentRecord - 1 ' Without this, get couple blank pages
DoCmd.RunCommand acCmdSelectRecord
DoCmd.PrintOut acPages, PagePrt, PagePrt
The problem is that when I click to print, it will print the last printed record from one of the other item forms instead of the record on the current form. When I click print a 2nd time, it correctly prints the selected record. I have preceded the code with refresh, requery etc., no effect.
Any help much appreciated-driving me crazy.