VERSION 5.00 Begin VB.Form frmChange Caption = "Change Log" ClientHeight = 2745 ClientLeft = 60 ClientTop = 345 ClientWidth = 3990 ControlBox = 0 'False KeyPreview = -1 'True LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 2745 ScaleWidth = 3990 StartUpPosition = 3 'Windows Default Begin VB.TextBox txtNotes2 Height = 285 Left = 960 TabIndex = 5 Top = 975 Visible = 0 'False Width = 1545 End Begin VB.CommandButton cmdExit Caption = "&Exit" Height = 435 Left = 2700 TabIndex = 3 Top = 600 Width = 1095 End Begin VB.TextBox txtNotes Height = 1335 Left = 120 MultiLine = -1 'True TabIndex = 2 Top = 1260 Width = 3735 End Begin VB.Label lblNotes AutoSize = -1 'True Caption = "Notes:" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 195 Left = 120 TabIndex = 4 Top = 960 Width = 570 End Begin VB.Label lblAction BorderStyle = 1 'Fixed Single Height = 315 Left = 120 TabIndex = 1 Top = 600 Width = 2415 End Begin VB.Label lblProjLot BorderStyle = 1 'Fixed Single Height = 315 Left = 120 TabIndex = 0 Top = 120 Width = 3675 End End Attribute VB_Name = "frmChange" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private Sub cmdExit_Click() Dim strSQL As String Dim oRS As Recordset On Error GoTo Error_EH If Len(txtNotes) = 0 Then MsgBox "You Must Enter A Reason In The Notes", vbOKOnly, "Enter Reason" txtNotes.SetFocus Exit Sub End If strSQL = "SELECT * FROM tblLotChange WHERE lot_id = 1" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic oRS.AddNew oRS!reason = Field2Str(txtNotes) & " - " & Field2Str(txtNotes2) oRS!User = gstrLOGIN oRS!Lot_id = gintLOTID oRS!Action = Left(Field2Str(lblAction), 20) oRS.Update Unload Me Exit Sub Error_EH: Call ErrorHandler(oRS.ActiveConnection) Exit Sub End Sub Private Sub txtNotes_GotFocus() Call FieldSelect(txtNotes) End Sub Private Sub txtNotes_LostFocus() txtNotes.Text = UCase(txtNotes.Text) End Sub Private Sub Form_Load() On Error GoTo Error_EH ' Call ProjLoad ' lblProjLot = moRSProj!proj_code & " " & moRSProj!proj_desc Exit Sub Error_EH: Call ErrorHandler2 Exit Sub End Sub Private Sub Form_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then SendKeys "{TAB}" KeyAscii = 0 End If End Sub