Unanswered: Problems printing only the current record
I am trying to make a command button to print the current record i am working on in a form. I followed to instruction in the Access help index to no avail. The instructions are as follows:
1)Open the form in Design view.
2)Click Control Wizards in the toolbox if it's not already pressed in.
3)In the toolbox, click Command Button .
4)On the form, click where you want to place the command button.
5) In the first wizard dialog box, click Record Operations in the Categories box, and then click Print Record in the Actions box.
It creates the button just fine but when I use the button it prints every record in the database instead of the current one.
This is the code the wizard creates for the print button:
Private Sub Print_Current_Click()
On Error GoTo Err_Print_Current_Click
A simple, if not elegant, approach to this might be to filter the form so that it only shows one record at a time. Keep the form you've got, but open if from another form which you use to search for a particular record, this should then open the form with only one record, which you can then print.
That code should not be a problem. I have just tried it on my DB and it only prints one record. It shouldn't make any difference, but make sure you have a primary key set. I would delete the command button and create a new one. See if that does the trick.