473,320 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Sending One Field To The Printer

HB2
I have a form with several fields. I want to add a control to click on to
send the contents of one field to the printer.

Can someone offer help with the code for this?

Thank you
Bill
Nov 13 '05 #1
1 1144
Bill, why not design a Report and put one control on it. Set it's control
source equal to the control on your form like so.

'If the control is on your main form:
=[Forms]![MyForm].Form.MyField
'If the control is on a subform:
=[Forms]![MyForm]![MySubForm].Form.MyField

'Place a command button on your form to print the report
Private Sub MyCommandButton_Click()
Dim stDocName As String
stDocName = "MyReport"
DoCmd.OpenReport stDocName, acNormal
End Sub
--
Reggie

----------
"HB2" <bg******@comcast.net> wrote in message
news:8e6yc.77989$Ly.46472@attbi_s01...
I have a form with several fields. I want to add a control to click on to
send the contents of one field to the printer.

Can someone offer help with the code for this?

Thank you
Bill

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Vlki | last post by:
Hello, I can't find a way to send printer specific language codes to printer. Part of my code : String sString = "B50,0,0,3,1,2,50,B," + "12345678901234567890"; Font fFont = new Font("Arial",...
4
by: Schwarty | last post by:
I hope I posted this to the correct group. If not, please let me know and I will get it posted in the correct section. I have a web application developed in ASP.NET using C# for the code behind....
1
by: Paul Aspinall | last post by:
Hi I'm writing a web based system, which needs to direct prints to a Zebra barcode printer. I plan to use the ZPL (Zebra's own) programming language for sending Raw ASCII to the printer, and...
0
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
6
by: Barry Edmund Wright | last post by:
Hi, We are having a large cheque run printed by an outside printer. The printer asked us to give him the layout of the fields to print on a form and send it to him. As an example the form looks...
1
by: deric | last post by:
Hi! I'm new to VB.net programming on printing a page to a thermal printer (Epson T88IV). I really had a hard time figuring out how to code the printing of a bitmap image and some text, while sending...
2
by: sphinney | last post by:
OK, is Access 2007 driving anyone else nuts? I've got three lines of VBA code that sends a report to the printer: DoCmd.OpenReport RPT_NAME, acViewPreview, , , , ARGS DoCmd.RunCommand...
0
by: Charles Crawford | last post by:
Hi, This apparently is a common problem and I've yet to read a solution that actually works for my specific situation. I have a Zebra RW220 printer that I connect to via Bluetooth connection...
0
by: =?Utf-8?B?Q2hhcmxpZQ==?= | last post by:
Hi, This apparently is a common problem and I've yet to read a solution that actually works for my specific situation. I have a Zebra RW220 printer that I connect to via Bluetooth connection...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.