ms access - printing a record -
I am using this code to print a record from the form
Private sub Bitianpratirekordklik () on error GoTo Err_btnPrintRecord_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8 ,, acMenuVer70 DoCmd.PrintOut acSelection Exit_btnPrintRecord_Click: Exit sub Err_btnPrintRecord_Click: MsgBox Err.Description resume Exit_btnPrintRecord_Click End sub
< P> However, this code is not automatically printing printer to select printer, it is automatically sending the printer by default . Anyone can help to print a print window to choose a printer from it. DoMenuItem has been deprecated since at least 2000 onwards.
You can use RunCommand to open a print window.
DoCmd RunCommand ACCMD print
There is almost no good idea to print the record. It does not take much time to prepare a report that can be used with any argument. This will give you more control and will give a very enjoyable experience to your users.
Comments
Post a Comment