Unanswered: Print current record revert to first record on form
I am trying to print my current record that is loaded into my form. I am using the wizard to create the print record button. After I hit the button the form loads the first record and prints it out. I have a form and a subform, the form is the employees and the subform is for the employees record. I am using the employees ID as the Primary Key. Any suggestions why the Form returns to the first record and prints this record?
I would like to print directly from the form, but I can send it to a report by saving the form as a report. However, when I try to print a report it prints all the records. When I print from the form it rolls back to the first record in the table for that employee. I have a Subform in a Form. The form has a drop down list that loads the employee into the form. The subform is where the employees individual records are loaded. I used the printout function and the wizard to create a print button, neither of these work. They both roll the record in the subform back to the first record for the employee and then print the first record
Im not really that strong of a VB programmer, but the record source is setup to point at the correct table. Is reselecting the record source with code going to resolve this issue. If so can elaborate on how to implement the code in the last thread. Thanks for everyones help
The name of my form is Analyst and my report is named rptPrintRecord. Therefore here is how I modified your code. Again I do not know VB that well...so please correct any of my mistakes. I really appreciate your help.
Private Sub Command37_Click()
On Error GoTo error
Dim stDocName As String
Dim stLinkCriteria As String
Dim acvp As Integer