Print Button

Talk about anything at all....
Post Reply
Dyami
Posts: 5
Joined: Thu Oct 16, 2014 9:28 pm

Print Button

Post by Dyami »

I have a Database that I need to put a print Record button on and I know you can do it through the push button and I have been trying to get the right macro for it but i keep hitting a wall. Here is the command I have been trying to shove into the macro.
Option Compare Database

Private Sub Print_Record_Click()
On Error GoTo Err_Print_Record_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection

Exit_Print_Record_Click:
Exit Sub

Err_Print_Record_Click:
MsgBox Err.Description
Resume Exit_Print_Record_Click

End Sub
OpenOffice 4.1.1 on windows7 pro
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Print Button

Post by Villeroy »

This forum is about the OpenOffice suite.

Obviously you are using MS Access. On http://www.accessforums.net/ you may find someone to fix your VBA macro.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Dyami
Posts: 5
Joined: Thu Oct 16, 2014 9:28 pm

Re: Print Button

Post by Dyami »

I took the command from access because I didnt' know where to start and the document that was made in access already had the print button in it
OpenOffice 4.1.1 on windows7 pro
Dyami
Posts: 5
Joined: Thu Oct 16, 2014 9:28 pm

Re: Print Button

Post by Dyami »

I am really just looking for a way to turn that script into something that OpenOffice can see and execute any help at all would be appreciated.
OpenOffice 4.1.1 on windows7 pro
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Print Button

Post by Villeroy »

Well, then you can't do it with a click on a button because you can not write any macros. Picking a single record for reporting can be done without macros.
Open the attached document.
Open the "ID Filter" form.
Pick an ID number from the list box and hit OK. The unique ID identifies one particular record from the "Data" table.
The subform shows the selected record. Now you can print the form or you can print the report named "Report3" which refers to the same ID value which is stored in row #5 of table "Filter".
Attachments
FilterData3.odb
(101.46 KiB) Downloaded 2276 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Dyami
Posts: 5
Joined: Thu Oct 16, 2014 9:28 pm

Re: Print Button

Post by Dyami »

well my boss has his own way of filtering for records but the original access document has a button that lets you print whatever record you are on at the time. Its just like going to file>Print>Page, but he wanted it to be as easy in OpenOffice as it was in access
OpenOffice 4.1.1 on windows7 pro
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Print Button

Post by Villeroy »

Well, then you boss will have some money left for MS Access, right? We are not here to do your work.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Dyami
Posts: 5
Joined: Thu Oct 16, 2014 9:28 pm

Re: Print Button

Post by Dyami »

well I was just hoping for some kind of guidance so if anyone else wants to answer and not be a total dick I will leave this open
OpenOffice 4.1.1 on windows7 pro
Post Reply