title image


Smiley Re: Druckerkassetten auswählen // SQL-Abfrage
Hallo,Aus Klaus Oberdalhoff's KnowHw30.mdb:www.accessware.deFunktioniert nicht bei *.mde Dateien!In Modul kopieren:'****************** Modul Start **********************Public Type PRINTER_DEFAULTS pDatatype As Long pDevMode As Long DesiredAccess As LongEnd TypePublic Const STANDARD_RIGHTS_REQUIRED = &HF0000Public Const PRINTER_ACCESS_ADMINISTER = &H4Public Const PRINTER_ACCESS_USE = &H8Public Const PRINTER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or _PRINTER_ACCESS_ADMINISTER Or PRINTER_ACCESS_USE)Type str_DEVMODE strGZF As String * 94End TypeType type_DEVMODE strDeviceName As String * 16 intSpecVersion As Integer intDriverVersion As Integer intSize As Integer intDriverExtra As Integer lngFields As Long intOrientation As Integer intPaperSize As Integer intPaperLength As Integer intPaperWidth As Integer intScale As Integer intCopies As Integer intDefaultSource As Integer intPrintQuality As Integer intColor As Integer intDuplex As Integer intResolution As Integer intTTOption As Integer intCollate As Integer strFormName As String * 16 lngPad As Long lngBits As Long lngPW As Long lngPH As Long lngDFI As Long lngDFr As LongEnd TypePublic Function Druckerkasette(RptName As String, nSheetFeeder As Integer) Dim GeräteZF As str_DEVMODE Dim DM As type_DEVMODE Dim strGerätemodus As String Dim rpt As Report DoCmd.OpenReport RptName, acDesign Set rpt = Reports(RptName) If Not IsNull(rpt.PrtDevMode) Then strGerätemodus = rpt.PrtDevMode GeräteZF.strGZF = strGerätemodus LSet DM = GeräteZF DM.intDefaultSource = nSheetFeeder LSet GeräteZF = DM Mid(strGerätemodus, 1, 94) = GeräteZF.strGZF rpt.PrtDevMode = strGerätemodus Else MsgBox "Keine Printer Dev Mode" End If DoCmd.Close acReport, RptName, acSaveYesEnd Function'****************** Modul Ende **********************Im Formular Schaltflächencode:Private Sub Befehl0_Click()Call Druckerkasette("Berichtsname", 1) 'obere KasetteDoCmd.OpenReport "rptCustomers", acViewPreviewDoCmd.PrintOut acPages, 1, 1 'Seite 1Call Druckerkasette("Berichtsname", 2) 'untere KasetteDoCmd.PrintOut acPages, 2, 2 'Seite 2End SubVerwende like:strSQL = "SELECT * FROM [Tabelle] WHERE [Tabelle].[Feld1] like '" + strVar + "*'"Zoom:like ' " + strVar + " * ' "Das + wäre! nur problematisch wenn strVar numerisch sein würde (ist aber nicht :-)).GrußWalter Griesser

geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: