Iv got a form with various data on it. The data comes from a table.I wish to print the detils on my form onto a label (10cmx12cm) as it appears on my form. I understand the best way to do this is via a report. So, i have created my report from the same table that my form gets its data from. I have laid my report out (visually) in the style i wish to appear on my printed label. Then i have added a cmd button to my form, which carries out the 'print report' code. However, this code sends all the records in my table to the printer, where as i only want to print the current record. Any suggetsions?
This is my current print code behind the cmd button on my form:
Private Sub PrintLabel_Click()
On Error GoTo Err_PrintLabel_Click
Dim stDocName As String
stDocName = "PalletLabel"
DoCmd.OpenReport stDocName, acNormal
Exit_PrintLabel_Click:
Exit Sub
Err_PrintLabel_Click:
MsgBox Err.Description
Resume Exit_PrintLabel_Click
End Sub
I need to try and create a simple form that a user enters data into and then hits a print button and the text they entered is printed in a particular way.
i.e. they type in someones name, job and company into 3 fields and then hit a print button and this then prints :
PERSONS NAME JOB TITLE COMPANY
We also need the print to be formatted a particular way but that is another issue
This is for a small exhibition we are trying to run and we need something to print visitor badges with
Has anyone got any ideas that can really help as we have been let down by someone who was going to do this for us
I've created labels in my database and when I print them on a label printer, I get a blank label in between my printed labels. I've checked the printer settings and properties and can't find anything. I've also checked the database properties and can't find anything. Is there something in the database that I'm missing?
I have a report that should print on labels ready to be stick on a book, but how can I tell the report to start from 3th row 2nd column so I do not waste any labels?
Ok, I've run into two serious problems in testing, and another question that I'm hoping you guys can help me solve. Below my questions is the code used for making the search query/email program.
Problem #1: In testing, this search program only is working for me for new data. Any data that I had in the database prior to implimenting the program will not move past the search stage. In other words, I will do a search, it will find the emails and bring them up in a box, I hit "OK" and it gets hung up and won't move on to opening up a new Email with the addresses implemented. However if I enter new data in the database, say with a weird name so its only bringing up the new entry and no old entry, it works fine and opens up the new email.
Problem #2: Items I would like to search like check boxes. Say I have a check box "Donor", this is listed in the database as a 1 or 0. I can't have my boss searching 1 or 0. Is there a way to change this to, say, being recorded in the DB as a Yes or No. That way he would check to search "Donor" and type Yes in the search box and this would search the DB "Donor" column for "Yes" and bring up the results.
New Question: My boss and I reviewed the form as it is so far yesterday. He was asking if I could add a Print Labels option in there. I'm wondering instead of adding another seperate search box and all that mess for a labels search print, can I rather add two check boxes, one labeled "Print Labels" and the other labeled "Email". What this would do is depending on the check box you selected it would either run the search and email like we have it, or clicking the other check box would run the search and print labels.
Quote: 'Author: Michael Walts, but use it as you like'Important information! this code requires a reference to the Microsoft DAO object library Option Compare Database Option Explicit
Private Sub cmdEmail_Click()
'will hold the dynamic SQL query Dim strSQL As String
'will hold the WHERE clause portion of our SQL query Dim strWHERE As String
'will hold all the recipients of this message Dim strRecipients As String
'the recordset we will use to get the emails of the records that match our criteria Dim rst As DAO.Recordset
'if there is input in the search criteria, then we will run the query and send the e-mail If txtSearch <> "" Then
'if you have more buttons, just add mosr cases (the value of the radio button '= the Case number, so Value of the State radio button is 1, etc.) Select Case opgSearch.Value
Case 1 strWHERE = "WHERE State = '" & txtSearch & "'"
Case 2 strWHERE = "WHERE City = '" & txtSearch & "'" End Select
strSQL = "SELECT EMail FROM tblUser " & strWHERE
'run the query and get the results into the recordset Set rst = CurrentDb.OpenRecordset(strSQL)
'Loop through the recordset and add all the EMails Do While Not rst.EOF strRecipients = strRecipients & ";" & rst!EMail rst.MoveNext Loop
'remove the first ; from the strRecipients strRecipients = Right(strRecipients, Len(strRecipients) - 1)
'stops a ' entered in the field from breaking the query Private Function SQLSafe(safeMe As String) As String SQLSafe = Replace(safeMe, "'", "''") End Function
I have a printed form that pulls some of its data from a table.What i need is that printed form to have a variable that two area in the form can change based on who is printing the form.I have a table that has all the users data in it. the current form pulls that information from the label and places it into the for. easy enough so far right.
for example. But i need this printed form to be able to be dynamic. So for instance Tom inst sitting that the computer wanting to print the form and so on for four different users who will print the form.So the button that allows the print either needs a way to have a selection or i need four different button. So the second part of this Mark Twain quits his job and Johnny takes his place. easy enough to change the data in the table that my form is pulling the data from but the button label needs to change to that the button.
I created a table called weld_performance. it consist weld_id, weld_prod, total_rt, accepted, rejected, and rejection rate. from weld_prod until rejection rate, the type data is number. the rejection rate field size is Single, and Format is Percent.
Based on this table, i create a query called query1. and based on this query1, i create a chart. please see attachment pic001. as you can see the data label on the chart is showing 0.66667. but in my query1, the value is 67%. if i click the value (67%) it's change to 0.66667.
So I guess, the chart is read the 0.66667 value from the query. now what i want to ask is, how can my chart data label is shown 67% instead of 0.66667 ??
I am attempting to create a printed label with a concatenated field. I want the field to abbreviate several shapes and colors but i will just start with the shape.
=IIf([Shape]="round","RD","TH")
This is what my basic statement says. I am attempting to nest other options inside of this.
I have limited users to not show the ribbon, but I need them to be able to print of reports or export them as pdf files how do I give them access only to do this ?
New to Access. We have a existing database in use that has a minor glitch. The main form we use to add records to has a subform. All of the data in the main form shows up when printed to a pdf file. The header section & detail section of the subform prints to the pdf file but the footer section remains blank in the pdf file.
Once images / reports are printed they can be removed.
Should I have a page that shows maybe 40 images and a big print button? or 40 images with a selection box by each one and a big print button? or 40 images and 40 print buttons? etc
The reports will need to change in the future, so a option to select any or all of the reports would be a really good idea.
I have access 2013 but I much prefer 2003 as I know where all the buttons are!
I have an Access based CRM system that was built for me in 1998. Amazingly it is still pretty effective. However, I would like to make a small adjustment in the programming..
Once we've added the details for an order we press continue and the screen closes and one copy of the acknowledgement of order form. I simply want it to print three copies!
I believe this is the coding part of the command that is effected.
Rem Print Report DoCmd.OpenReport "Order Acknowledgement" Rem Close Form DoCmd.Close acForm, "Booking Entry"
When I print a report from Access, it prints fine. When a colleague does it to the same printer, it misses out lots of letters. Another colleague does it, and it prints fine. The font is standard (Calibri). My IT dept. say it isn't the printers fault. Is it something wrong with my report ?
I am getting an error message when printing a 2 part report. It does not appear until I have already printed the first part and I am ready to print the second. I have 6 users and all seem to experience intermittently with the exception of 1 who it is constant. The message is as follows;
"There isn't enough memory to update the display. Close unneeded programs and try again."I have tried deleting the registry "KEY_ CURRENT_ USER SoftwareMicrosoftVBA" with no avail and have installed all available updates from MS.
I have report that i have in preview. In that report i have ribbon that has buttons close and print. Close works fine, with print it goes ok but when "printer selection" comes, i try to change printer it informs that not enough memory. All this code that is in ribbon buttons is in VBA.
What could be the reason for memory stuff or how could this be made that this inform wouldn't come.
Code below: Sub EnnakkoMyButtonCallbackOnAction(control As IRibbonControl) Select Case control.ID Case "MyBtn1" DoCmd.OpenReport "Tuotanto Ennakko", acViewPreview
I've written an application in VB.Net and now I need to transfer the data on textboxes on a form to a report for printing. Only the data on the form is what I want to preview and print.
But what I need is that before printing, open the preview to set the margins and page size ... or at least to pre-configure so that when you press the button, and comes preformatted.
I was having trouble just setting each report with a particular print method - for some reason they just kept forgetting their individual settings and resorting to default on the machine.
This meant reports were printing on the wrong paper, or the wrong size paper, the wrong orientation and some times refusing to print if it couldn't find the paper (which is useful in runtime as it doesn't display error messages)
So I used Reports(rpt).printer properties (I forgot where I found this) to hard code the printer properties into each print command... this meant I had to use another function to insert the variables.
So all I had to do was say:
Code: PrintMe("Invoice","InvoiceID",iID)
and a report would print to exactly how I wanted... but it's just too slow!
See attached for full code, I have a niggling feeling it may be the function: PrinterOK, to make sure the printer exists or not.
Code: Function PrinterOK(sPrinterName As String) As Boolean Dim MyPrinter As Printer PrinterOK = False For Each MyPrinter In Printers If MyPrinter.DeviceName = sPrinterName Then PrinterOK = True Exit Function End If Next End Function
I know it's the printing code, because if I stop the printing and just preview then it shows up almost instantly.