Check For Print Spooling

Oct 31, 2005

I have a form with a button to print of the contents of the form in a report.
I have set it that when the user close the form they can no longer access what they have entered. Therefore on close of the form i would like to check to see if the user has printed the report and is happy to make changes else he can cancel and make the changes required.

Is this possible?

View Replies


ADVERTISEMENT

Forms :: Using Check Box To Select Records To Print

Jun 23, 2015

I have a form open, but want to print only specific fields in each record. Been trying lots of filtering methods to no avail as I am a novice at filtering.

I can filter records, but cant figure out how to filter specific fields from those records.

My project goes something like this:

Each record in my form consists of listed items like on an invoice. However, not all the items on any given invoice will be printed. Therefore, I set up checkboxes beside each line, so for each invoice, I only tick the items I want to be printed from that invoice. However, I just cannot yet find a way to print the selected items.

View 7 Replies View Related

Check Boxes In A Form To Have Certain Text Print Out?

Apr 18, 2014

I was wondering if there was a way to use check boxes in a form to have certain text print out. It's part of an invoice type form and there are 4 different treatments that could have been part of the appointment and the goal is to have a way to check the treatments for that appointment and only have the checked ones print out..

View 1 Replies View Related

I Want To Print A Report And Programmatically Set The Printer Name And 'Print To File

Jul 16, 2007

How can I print a report and at the same time programatically set the printer name and 'Print to File' option and set the path of this option?

View 1 Replies View Related

How To Hide Or Disable Print Or Quick Print Options

Dec 4, 2014

I have a form which my company wanted that each single record should be printed from form. I made a print record button and put code to print single page or record. However as a natural habit people go to file > print to print which leads printing all records so 1000's records start printing. Is there any way i can hide print button. File >Print button.

View 1 Replies View Related

Reports :: Unbound Report - Print Preview OK But None Of Fields Print When Report Directly Send To Printer

May 25, 2013

I have an unbound form with an associated report. When the user hits the 'print' button on the form/screen, the report is launched in the background. In the On Load event of the report I populate the report fields from the forms field as so:

Code:
Me.txtAddrMainLine2 = "NAME " & UCase([Forms]![frm_OrderRx].[txtPatientName])

This works like a charm as long as I call the report in Print Preview mode (i.e. with acViewPreview). But if I send the report directly to the printer, none of the fields print.

I've read about using other report events to populate the fields (e.g., On Format and On Print) and also something about using TempVars to pass the data. But I haven't read anything that's clear and definitive about the full answer.

View 3 Replies View Related

Forms :: Make Image Appear In Form When There Is Check In Check Box From Table?

Jun 26, 2014

how can i make a image appear in my form when there is a check in the check box from the table?

View 14 Replies View Related

Access Application For Check-in/check-out

Mar 19, 2007

Long time lurker, first time poster.

I'm in need a of a check-in/check-out application for my company. We have about 550-600 employees at any given time and our turnover is about 20-30% per year. Our check-in/check-out process requires our employees to personally visit between 30-40 areas in our company (personnel, safety, credentials, parking, insurance, etc) within the first month of employment. This is currently done manually and is a huge drain on labor, especially when check-in sheets are lost, misplaced or, in some cases, forged.

I'm looking to build a database that would be intranet based, password secure (by check-in area) that would allow the new employee to present at a particular check-in, check-out site, complete that portion of the check-in/out process and then allow the person responsible for the check-in/out to enter the status into the database. At any point in the process, I would want to know the status of the person checking in/out (how long they've been checking in/out and what portion of the process have they completed).

Can this be done in ACCESS?

Thanks

View 1 Replies View Related

Spell Check Contents Works , Need To Suppress The Spell Check Complete Msg Box

Apr 25, 2005

Hi
I have sendkey "{f7}" on loss focus.
this works great as a spell check but then I get the mesage box that spell check is complete.
How do I stop this box from occuring?

View 2 Replies View Related

Print To PDF - Almost There....

Nov 9, 2005

The code below does not give me any error. I do get a file save dialog box and i put the file name and a message saying export is done. but in reality there is no pdf file saved under what ever directory i told the system to save...




Public Sub Print2PDF(strReportName As String, Optional strPath As String)

Dim stDocName As String, strFilter As String
Dim Distiller As ACRODISTXLib.PdfDistiller

'InputPSFile - path to existing PS file in c: emp
'OutputPDFFile - path of PDF file to be created in c: emp
'2 lines of code:
'ACRODISTXLib.PdfDistillerClass Distiller=new ACRODISTXLib.PdfDistillerClass();
'Distiller.FileToPDF(InputPSFile, OutputPDFFile,"");

Set Distiller = CreateObject("PdfDistiller.PdfDistiller.1")
Distiller.bSpoolJobs = False
Distiller.bShowWindow = False
ITransform_Transform = False

'Ask for the path if it is not provided
If Trim(strPath) = "" Then
strFilter = ahtAddFilterItem(strFilter, "Adobe PDF Files (*.pdf)", "*.pdf")
strPath = ahtCommonFileOpenSave( _
OpenFile:=False, _
Filter:=strFilter, _
flags:=ahtOFN_OVERWRITEPROMPT Or ahtOFN_READONLY)
End If

'If Distiller.FileToPDF(pFromFile, pToFile, "") Then

'If Distiller.FileToPDF("strReportName.ps", "", "") Then
Distiller.FileToPDF "strReportName.ps", "", ""

'Distiller.FileToPDF OutputDir & "" & ps, OutputDir & "" & pdf, ""
' ITransform_Transform = True
'End If

Set Distiller = Nothing

End Sub

View 1 Replies View Related

Print To PDF

Nov 10, 2005

I used to be able to create PDFs, automatically save them to a file,
and mail them out to people. This was on Access 97 with Windows NT.
We've changed to Windows XP and Access 2003. Doesn't work anymore.
Part of the problem is that the users have no access to the registry
and can only save files on the C: drive to their My Documents folder.
I found this code on the web, but it doesn't work either. The files
continue to print out of my printer instead of making a PDF. I put the
entire code at the bottom, but here is the part I'm calling:

Public Sub SaveReportAsPDF(strReportName As String, Optional strPath As String)

Dim strOldDefault As String
Dim strFilter As String

'Ask for the path if it is not provided
If Trim(strPath) = "" Then
strFilter = ahtAddFilterItem(strFilter, "Adobe PDF Files (*.pdf)", "*.pdf")
strPath = ahtCommonFileOpenSave( _
OpenFile:=False, _
Filter:=strFilter, _
flags:=ahtOFN_OVERWRITEPROMPT Or ahtOFN_READONLY)
End If

'remember old printer
strOldDefault = QueryKey("SoftwareMicrosoftWindowsCurrentVersionWindows", "Device")

'changes to pdf writer
SetKeyValue "SoftwareMicrosoftWindowsCurrentVersionWindows", "Device", "Adobe PDF", REG_SZ

SetKeyValue "SoftwareAdobeAcrobat Distiller", "PDFFilename", strPath, REG_SZ

SetKeyValue "SoftwareAdobeAcrobat Distiller", "bExecViewer", 0, REG_SZ

'Distiller.FileToPDF strReportName
DoCmd.OpenReport strReportName

'put the old printer back to default
SetKeyValue "SoftwareMicrosoftWindowsCurrentVersionWindows", "Device", strOldDefault, REG_SZ

End Sub



The entire code:

' ################################################## #######
Option Compare Database
Option Explicit

Public Const REG_SZ As Long = 1
Public Const REG_DWORD As Long = 4

Public Const HKEY_CLASSES_ROOT = &H80000000
Public Const HKEY_CURRENT_USER = &H80000001
Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const HKEY_USERS = &H80000003

Public Const ERROR_NONE = 0
Public Const ERROR_BADDB = 1
Public Const ERROR_BADKEY = 2
Public Const ERROR_CANTOPEN = 3
Public Const ERROR_CANTREAD = 4
Public Const ERROR_CANTWRITE = 5
Public Const ERROR_OUTOFMEMORY = 6
Public Const ERROR_ARENA_TRASHED = 7
Public Const ERROR_ACCESS_DENIED = 8
Public Const ERROR_INVALID_PARAMETERS = 87
Public Const ERROR_NO_MORE_ITEMS = 259

Public Const KEY_QUERY_VALUE = &H1
Public Const KEY_SET_VALUE = &H2
Public Const KEY_ALL_ACCESS = &H3F

Public Const REG_OPTION_NON_VOLATILE = 0

Declare Function RegCloseKey Lib "advapi32.dll" _
(ByVal hKey As Long) As Long
Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias _
"RegCreateKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, _
ByVal Reserved As Long, ByVal lpClass As String, ByVal dwOptions _
As Long, ByVal samDesired As Long, ByVal lpSecurityAttributes _
As Long, phkResult As Long, lpdwDisposition As Long) As Long
Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias _
"RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, _
ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As _
Long) As Long
Declare Function RegQueryValueExString Lib "advapi32.dll" Alias _
"RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As _
String, ByVal lpReserved As Long, lpType As Long, ByVal lpData _
As String, lpcbData As Long) As Long
Declare Function RegQueryValueExLong Lib "advapi32.dll" Alias _
"RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As _
String, ByVal lpReserved As Long, lpType As Long, lpData As _
Long, lpcbData As Long) As Long
Declare Function RegQueryValueExNULL Lib "advapi32.dll" Alias _
"RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As _
String, ByVal lpReserved As Long, lpType As Long, ByVal lpData _
As Long, lpcbData As Long) As Long
Declare Function RegSetValueExString Lib "advapi32.dll" Alias _
"RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, _
ByVal Reserved As Long, ByVal dwType As Long, ByVal lpValue As _
String, ByVal cbData As Long) As Long
Declare Function RegSetValueExLong Lib "advapi32.dll" Alias _
"RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, _
ByVal Reserved As Long, ByVal dwType As Long, lpValue As Long, _
ByVal cbData As Long) As Long
Public Function SetValueEx(ByVal hKey As Long, sValueName As String, _
lType As Long, vValue As Variant) As Long
Dim lValue As Long
Dim sValue As String
Select Case lType
Case REG_SZ
sValue = vValue & Chr$(0)
SetValueEx = RegSetValueExString(hKey, sValueName, 0&, _
lType, sValue, Len(sValue))
Case REG_DWORD
lValue = vValue
SetValueEx = RegSetValueExLong(hKey, sValueName, 0&, _
lType, lValue, 4)
End Select
End Function
Function QueryValueEx(ByVal lhKey As Long, ByVal szValueName As _
String, vValue As Variant) As Long
Dim cch As Long
Dim lrc As Long
Dim lType As Long
Dim lValue As Long
Dim sValue As String

On Error GoTo QueryValueExError

' Determine the size and type of data to be read
lrc = RegQueryValueExNULL(lhKey, szValueName, 0&, lType, 0&, cch)
If lrc <> ERROR_NONE Then Error 5

Select Case lType
' For strings
Case REG_SZ:
sValue = String(cch, 0)

lrc = RegQueryValueExString(lhKey, szValueName, 0&, lType, _
sValue, cch)
If lrc = ERROR_NONE Then
vValue = Left$(sValue, cch - 1)
Else
vValue = Empty
End If
' For DWORDS
Case REG_DWORD:
lrc = RegQueryValueExLong(lhKey, szValueName, 0&, lType, _
lValue, cch)
If lrc = ERROR_NONE Then vValue = lValue
Case Else
'all other data types not supported
lrc = -1
End Select

QueryValueExExit:
QueryValueEx = lrc
Exit Function

QueryValueExError:
Resume QueryValueExExit
End Function
Public Function CreateNewKey(sNewKeyName As String, lPredefinedKey As Long)

Dim hNewKey As Long ' Handle to the new key
Dim lRetVal As Long ' Result of the RegCreateKeyEx function

lRetVal = RegCreateKeyEx(lPredefinedKey, sNewKeyName, 0&, vbNullString, REG_OPTION_NON_VOLATILE, _
KEY_ALL_ACCESS, 0&, hNewKey, lRetVal)

RegCloseKey (hNewKey)

End Function
Public Function SetKeyValue(sKeyName As String, sValueName As String, vValueSetting As Variant, lValueType As Long)

Dim lRetVal As Long ' Result of the SetValueEx function
Dim hKey As Long ' Handle of open key

' Open the specified key
lRetVal = RegOpenKeyEx(HKEY_CURRENT_USER, sKeyName, 0, KEY_SET_VALUE, hKey)

lRetVal = SetValueEx(hKey, sValueName, lValueType, vValueSetting)

RegCloseKey (hKey)

End Function
Public Function QueryKey(sKeyName As String, sValueName As String)

Dim lRetVal As Long ' Result of the API functions
Dim hKey As Long ' Handle of opened key
Dim vValue As Variant ' Setting of queried value

lRetVal = RegOpenKeyEx(HKEY_CURRENT_USER, sKeyName, 0, KEY_QUERY_VALUE, hKey)

lRetVal = QueryValueEx(hKey, sValueName, vValue)

QueryKey = vValue

RegCloseKey (hKey)

End Function
Public Sub SaveReportAsPDF(strReportName As String, Optional strPath As String)

Dim strOldDefault As String
Dim strFilter As String

'Ask for the path if it is not provided
If Trim(strPath) = "" Then
strFilter = ahtAddFilterItem(strFilter, "Adobe PDF Files (*.pdf)", "*.pdf")
strPath = ahtCommonFileOpenSave( _
OpenFile:=False, _
Filter:=strFilter, _
flags:=ahtOFN_OVERWRITEPROMPT Or ahtOFN_READONLY)
End If

'remember old printer
strOldDefault = QueryKey("SoftwareMicrosoftWindowsCurrentVersionWindows", "Device")

'changes to pdf writer
SetKeyValue "SoftwareMicrosoftWindowsCurrentVersionWindows", "Device", "Adobe PDF", REG_SZ

SetKeyValue "SoftwareAdobeAcrobat Distiller", "PDFFilename", strPath, REG_SZ

SetKeyValue "SoftwareAdobeAcrobat Distiller", "bExecViewer", 0, REG_SZ

'Distiller.FileToPDF strReportName
DoCmd.OpenReport strReportName

'put the old printer back to default
SetKeyValue "SoftwareMicrosoftWindowsCurrentVersionWindows", "Device", strOldDefault, REG_SZ

End Sub

View 1 Replies View Related

Print Subdatasheet

Nov 24, 2005

Hi!

I would like to print a table including subdatasheets in Access. However, in Access 2002 it collapses them, and closes the table when I click on Print Preview. (In Access 2000 it works.)
Any ideas?

View 1 Replies View Related

Print Form, HELP!

Mar 31, 2006

Hello!

I would like to be able to print a specified form when a new record is added to my database.

I have an add form which can be filled in, and there is an "Add" button at the bottom of the page, when this is clicked, I want the record to be added but also a specified form to be printed named "frmKitChecklist".

As I am a VB noob I do not know the code to do this, please could someone help me!

Thanks :)

View 3 Replies View Related

Print Problem

Aug 16, 2006

I have the following problem:The print button in access was associated with the default printer, but for some reason know there is no printer associated with it. If I click on it nothing happens. Also if i go through File->Print no screen pops up. Can anyone help me with this problem.TIA,Roda

View 3 Replies View Related

Print Tables

Sep 18, 2006

Hi,

Is there anyway to print tables when they are in design view?
I can't even copy and paste it on spread sheet!

Regards,
B

View 5 Replies View Related

How Do I Print On Envelopes?

Jan 2, 2007

I have 3 tables of Adds in my DB...
I have 3 dif. env.s (ranging in dimensions)
I want to able to choose the adds i want to print out on selective env.s And print them out... how do i get to do it?

View 2 Replies View Related

Print VBA Code

Apr 5, 2007

I need to print out my VBA code , I was wondering if there is an easier way to do it without cutting and pasting it onto Microsoft word.

View 1 Replies View Related

Code To Print!

Aug 24, 2007

Hello,

What's is the exact syntax to print a subformB (within a formA) using VBA code?
The code will be on the OnClick event of a button and the button is on formA.

Thanks

View 1 Replies View Related

Print Marker

Jan 28, 2008

I need a system which will tick all the boxes to corresponding records when I print a report?
The next time I open the report it would only show the unticked boxes which had yet to be printed.

Thanks for your help,

Richard

View 3 Replies View Related

Print Out With Fieldnames

Feb 11, 2005

Is there an easy way to printout a form in disignview so the fieldnames appear in the inputboxes? I've a form with 11 tabs and on each tab at least 10 input boxes (10x11 = 110 boxes :eek: ) Writing down the names on a printout is NOT effective

Thnx

View 2 Replies View Related

Print Options

Feb 17, 2005

I ned to create a form that asks the user which reports they want to preview/print. I see it as a set of tick boxes with one saying all, then a print button. Im not really sure though, can someone offer some advise or maybe an example?

View 5 Replies View Related

Fields Won't Print

Mar 16, 2005

Hi, (sorry to be cross-posting, but I didn't get any response from Modules and VBA)
I've messed something up, I think. But I'm not sure if I messed up VB or some connection in Access.

The Symptoms: I've got a print page with checkboxes that represent other form pages in my db.
The page basically prints ok, except where field information is supposed to be.
Wherever there should be field info, it prints #Name? instead. Each field can't seem to find it's info.

The funny thing is that the information displays correctly in the form onscreen.
Just not when I print.
Basically someone else wrote the the Print code and I've been hacking away to make this code work for 3 new forms (e.g. 3 new checkboxes).
While I'm not terribly familiar with VB, I know my way around script and I'm pretty sure I haven't really messed up that code.

How I got there:
At one point in my building of this thing, every time I went to open the 'print' page, I would get an error and drop into VB.
Well, this was driving me nuts, and at that point I hadn't altered the code. I was just trying to view the print page. So, I cleverly pasted into VB the code from an earlier version of the db. This cleared up the debug error nicely, and I was able to finish the code that would allow me to choose 3 new pages to print. But now it's doing the symptom above.

Any help would be appreciated.
Scott

View 3 Replies View Related

Print Report To PDF

Apr 28, 2005

Hey Guys,

I have searched and searched for this on the forum but to no avail. :(

I have just installed Adobe Acrobat 6.0 and so can create PDFs. Does anyone know the code I need for a button on a form to print a report to PDF format?

Many thanks,

Rusty
:D

View 4 Replies View Related

Pop-Up Print Button

May 4, 2005

First I should say that this is my first post, and I'm very new to this. Now on to my problem. We have a form with a bunch (like 25) of buttons that are links to specific reports. When you click on one of the buttons the report opens up along with a little pop up form with a print button on it. How can I get this print button to print the report that is open? Do I have to put in code for every possible report that may be open, or can I just say "print the current report" somehow?

Thanks,

Nick Jones

View 5 Replies View Related

Print Current

Jun 23, 2005

I have a control on a form where a user inputs a number then presses enter. The AfterUpdate event prints a report. The problem is that it prints the previous record each time its updated. I want to print the current record. Maybe some type of requery before the event happens. Any ideas?

View 1 Replies View Related

Print Pageheader

Jul 7, 2005

Hi All,

How can I write a code where a form only prints the PageHeader and not the Formheader (don't know how you call it in english)

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved