VERSION 5.00 Object = "{32B82FD1-3332-11D4-BF7C-E4453F764218}#1.0#0"; "EASYP.OCX" Begin VB.Form frmEPElev Caption = "Print Elevation" ClientHeight = 1005 ClientLeft = 60 ClientTop = 345 ClientWidth = 4680 LinkTopic = "Form1" ScaleHeight = 1005 ScaleWidth = 4680 StartUpPosition = 3 'Windows Default Begin VB.CheckBox chkFound Caption = "Pics Found" Height = 315 Left = 1980 TabIndex = 2 Top = 480 Visible = 0 'False Width = 735 End Begin EasyP.EasyPrint epElevation Left = 3960 Top = 360 _ExtentX = 847 _ExtentY = 847 ErrorMessagesOn = 0 'False PrintingMethod = 4 End Begin VB.PictureBox picElevation AutoRedraw = -1 'True AutoSize = -1 'True Height = 255 Left = 360 ScaleHeight = 195 ScaleWidth = 795 TabIndex = 0 Top = 420 Visible = 0 'False Width = 855 End Begin VB.Label lblElevation Alignment = 2 'Center BackColor = &H0080FFFF& Caption = "Printing Lot Elevations Please Be Patient" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FF0000& Height = 915 Left = 120 TabIndex = 1 Top = 0 Width = 4395 End End Attribute VB_Name = "frmEPElev" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim mboolJPG As Boolean Dim moRSElev As Recordset Private Sub Form_Activate() PrintJPG Unload Me End Sub Private Sub Form_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then SendKeys "{TAB}" KeyAscii = 0 End If End Sub Private Sub Form_Load() Dim strSQL As String, strFLAG As String strSQL = "SELECT * FROM tblLotElev where lot_id = " & gintLOTID ' strSQL = "SELECT * FROM tblElevation where Est_id = " & gintESTID Set moRSElev = New Recordset moRSElev.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly If moRSElev.EOF Then chkFound = vbUnchecked Else PrintJPG End If End Sub Private Sub picElevation_Change() mboolJPG = True End Sub Private Sub PrintJPG() Dim strSQL As String, oRS As Recordset, strFile As String On Error GoTo Error_EH: mboolJPG = False Do Until moRSElev.EOF strFile = App.Path & "\" & Field2Str(moRSElev!folder) & "\" & Field2Str(moRSElev!FileName) & ".jpg" picElevation.Picture = LoadPicture(strFile) epElevation.Margin(epTop) = 0.2 Set epElevation.PictureSource = picElevation epElevation.epPrint moRSElev.MoveNext Loop Exit Sub Error_EH: gstrMODULE = "Form EPElev - Module PrintJPG" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub