Print Button

Talk about anything at all....

Print Button

Postby Dyami » Thu Oct 16, 2014 9:31 pm

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
Dyami
 
Posts: 5
Joined: Thu Oct 16, 2014 9:28 pm

Re: Print Button

Postby Villeroy » Thu Oct 16, 2014 11:26 pm

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, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27300
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Print Button

Postby Dyami » Thu Oct 16, 2014 11:28 pm

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

Postby Dyami » Thu Oct 16, 2014 11:47 pm

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
Dyami
 
Posts: 5
Joined: Thu Oct 16, 2014 9:28 pm

Re: Print Button

Postby Villeroy » Thu Oct 16, 2014 11:51 pm

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 1582 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27300
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Print Button

Postby Dyami » Fri Oct 17, 2014 12:00 am

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
Dyami
 
Posts: 5
Joined: Thu Oct 16, 2014 9:28 pm

Re: Print Button

Postby Villeroy » Fri Oct 17, 2014 12:03 am

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, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27300
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Print Button

Postby Dyami » Fri Oct 17, 2014 12:07 am

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
Dyami
 
Posts: 5
Joined: Thu Oct 16, 2014 9:28 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests