I have a form with some unbound and bound controls. The form has a record source. When the form is run and controls are populated via a query (the recordsource), the user enters data in some unbound controls. The form also has a button which displays in print preview mode.
When the custom print preview button is clicked, the data from the unbound controls do not appear in the preview. But if I use the file-print preview menu item, the data is properly seen.
Below is the code written in the button click to display print preview
DoCmd.SelectObject acForm, "AnswerForm"
Printer.Orientation = acPRORLandscape
DoCmd.RunCommand acCmdPrintPreview
DoCmd.Maximize
I am unable to figure out why this behavior is happening. Any help with this is appreciated a lot.
Sincerely,
Sainath