VERSION 5.00 Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX" Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX" Begin VB.Form New_Journal BackColor = &H80000000& Caption = "บันทึก/แก้ไข ข้อมูลวารสาร" ClientHeight = 8730 ClientLeft = 60 ClientTop = 450 ClientWidth = 11880 LinkTopic = "Form1" MDIChild = -1 'True ScaleHeight = 8730 ScaleWidth = 11880 WindowState = 2 'Maximized Begin VB.TextBox Text6 BackColor = &H00C0FFFF& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 360 Left = 6720 TabIndex = 11 Top = 5880 Width = 2055 End Begin MSComCtl2.MonthView MonthView1 Height = 2370 Left = 4800 TabIndex = 53 Top = 6240 Visible = 0 'False Width = 2490 _ExtentX = 4392 _ExtentY = 4180 _Version = 393216 ForeColor = -2147483630 BackColor = 12648384 Appearance = 1 MonthBackColor = 12632319 StartOfWeek = 114163714 TitleBackColor = 4194368 TitleForeColor = 16777215 TrailingForeColor= 8421504 CurrentDate = 38204 End Begin MSDataListLib.DataCombo DataCombo1 Height = 315 Left = 6000 TabIndex = 64 Top = 5160 Width = 2895 _ExtentX = 5106 _ExtentY = 556 _Version = 393216 ForeColor = 16711680 Text = "" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin MSDataListLib.DataList dlbdealer DataField = "publisher_Name" DataSource = "Adodc1" Height = 1740 Left = 2040 TabIndex = 62 Top = 2040 Visible = 0 'False Width = 6135 _ExtentX = 10821 _ExtentY = 3069 _Version = 393216 BackColor = 12640511 ForeColor = 12582912 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin VB.TextBox Text9 Height = 285 Left = 6840 TabIndex = 61 Text = "Text9" Top = 4440 Visible = 0 'False Width = 975 End Begin VB.TextBox Text8 Height = 285 Left = 6840 TabIndex = 60 Text = "Text8" Top = 4080 Visible = 0 'False Width = 975 End Begin MSDataListLib.DataCombo dcbbindcolor Height = 360 Left = 6240 TabIndex = 16 Top = 5520 Width = 1575 _ExtentX = 2778 _ExtentY = 635 _Version = 393216 BackColor = 12648447 ForeColor = 12582912 Text = "" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin MSDataListLib.DataList dlbnamemag Height = 1980 Left = 2040 TabIndex = 57 Top = 1800 Visible = 0 'False Width = 5655 _ExtentX = 9975 _ExtentY = 3493 _Version = 393216 BackColor = 12640511 ForeColor = 12582912 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin MSComCtl2.MonthView MonthView2 Height = 2370 Left = 2040 TabIndex = 54 Top = 3600 Visible = 0 'False Width = 2490 _ExtentX = 4392 _ExtentY = 4180 _Version = 393216 ForeColor = -2147483630 BackColor = 12648384 Appearance = 1 MonthBackColor = 16761087 StartOfWeek = 114163714 TitleBackColor = 4194368 TitleForeColor = 16777215 TrailingForeColor= -2147483627 CurrentDate = 38204 End Begin VB.CommandButton Command1 BackColor = &H000040C0& Caption = "D" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Left = 3600 Style = 1 'Graphical TabIndex = 50 Top = 3750 Width = 300 End Begin VB.CommandButton Cmdadd BackColor = &H00FFC0FF& Caption = "เพิ่มรายชื่อใหม่" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Left = 9840 MaskColor = &H00C0FFFF& Picture = "New_Journal.frx":0000 Style = 1 'Graphical TabIndex = 49 Top = 3360 Width = 1455 End Begin VB.CommandButton Cmdedit BackColor = &H00FFC0FF& Caption = "แก้ไขข้อมูล" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Left = 9840 Picture = "New_Journal.frx":030A Style = 1 'Graphical TabIndex = 48 Top = 4080 Width = 1455 End Begin VB.CommandButton Cmddel BackColor = &H00FFC0FF& Caption = "ลบรายชื่อ" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Left = 9840 Picture = "New_Journal.frx":0614 Style = 1 'Graphical TabIndex = 47 Top = 4800 Width = 1455 End Begin VB.CommandButton Command6 BackColor = &H00C0C0FF& Caption = "Exit" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Left = 9840 Picture = "New_Journal.frx":0A56 Style = 1 'Graphical TabIndex = 46 Top = 6960 Width = 1455 End Begin VB.CommandButton Cmdsave BackColor = &H00FFFFC0& Caption = "บันทึก" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Left = 9840 Picture = "New_Journal.frx":0E98 Style = 1 'Graphical TabIndex = 45 Top = 5520 Width = 1455 End Begin VB.CommandButton Cmdcancle BackColor = &H00FFFFC0& Caption = "ยกเลิก" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Left = 9840 Picture = "New_Journal.frx":11A2 Style = 1 'Graphical TabIndex = 44 Top = 6240 Width = 1455 End Begin VB.Frame Frame3 BackColor = &H00C0E0FF& Height = 1575 Left = 360 TabIndex = 38 Top = 120 Width = 10935 Begin VB.Frame Frame4 BackColor = &H00C0FFC0& Caption = "เลขประจำวารสาร" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000080& Height = 975 Left = 7800 TabIndex = 58 Top = 360 Width = 2655 Begin VB.TextBox Text1 BackColor = &H00C0FFFF& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 375 Left = 480 MaxLength = 7 TabIndex = 59 Top = 360 Width = 1815 End End Begin VB.Frame Frame1 BackColor = &H00C0E0FF& Caption = "ประเภท" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 1095 Left = 480 TabIndex = 39 Top = 240 Width = 2415 Begin VB.OptionButton opt2 BackColor = &H00C0E0FF& Caption = "หนังสือพิมพ์" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H000040C0& Height = 375 Left = 600 TabIndex = 41 Top = 600 Width = 1575 End Begin VB.OptionButton opt1 BackColor = &H00C0E0FF& Caption = "วารสาร" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H000040C0& Height = 375 Left = 600 TabIndex = 40 Top = 240 Width = 1335 End End Begin MSDataListLib.DataCombo dcbtypemag Height = 360 Left = 4320 TabIndex = 1 Top = 960 Width = 2775 _ExtentX = 4895 _ExtentY = 635 _Version = 393216 BackColor = 12648447 ForeColor = 8388608 ListField = "" BoundColumn = "" Text = "" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin MSDataListLib.DataCombo dcblanguage Bindings = "New_Journal.frx":14AC Height = 360 Left = 4320 TabIndex = 0 Top = 360 Width = 2775 _ExtentX = 4895 _ExtentY = 635 _Version = 393216 BackColor = 12648447 ForeColor = 8388608 ListField = "" BoundColumn = "" Text = "" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin VB.Label Label11 Alignment = 1 'Right Justify BackColor = &H00C0E0FF& Caption = "ภาษา" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 375 Left = 3720 TabIndex = 43 Top = 360 Width = 495 End Begin VB.Label Label2 Alignment = 1 'Right Justify BackColor = &H00C0E0FF& Caption = "ชนิด" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 375 Left = 3720 TabIndex = 42 Top = 960 Width = 495 End End Begin VB.Frame Frame2 BackColor = &H00C0C0FF& Caption = "รายละเอียดการเป็นสมาชิก" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00004080& Height = 1455 Left = 2040 TabIndex = 34 Top = 6240 Visible = 0 'False Width = 4575 Begin VB.CommandButton Command3 BackColor = &H000040C0& Caption = "D" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Left = 3600 Style = 1 'Graphical TabIndex = 52 Top = 1000 Width = 300 End Begin VB.CommandButton Command2 BackColor = &H000040C0& Caption = "D" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Left = 3600 Style = 1 'Graphical TabIndex = 51 Top = 620 Width = 300 End Begin VB.TextBox Text11 Alignment = 1 'Right Justify BackColor = &H00FFFFC0& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 360 Left = 1800 TabIndex = 17 Top = 240 Width = 1335 End Begin VB.TextBox Mask4 BackColor = &H00FFFFC0& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 360 Left = 1800 Locked = -1 'True MaxLength = 10 TabIndex = 19 Top = 960 Width = 1695 End Begin VB.TextBox Mask5 BackColor = &H00FFFFC0& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 360 Left = 1800 Locked = -1 'True MaxLength = 10 TabIndex = 18 Top = 600 Width = 1695 End Begin VB.Label Label18 Alignment = 1 'Right Justify BackColor = &H00C0C0FF& Caption = "ค่าสมาชิก/ปี" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 255 Left = 360 TabIndex = 37 Top = 240 Width = 1215 End Begin VB.Label Label22 Alignment = 1 'Right Justify BackColor = &H00C0C0FF& Caption = "วันครบอายุ" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 255 Left = 360 TabIndex = 36 Top = 960 Width = 1215 End Begin VB.Label Label7 Alignment = 1 'Right Justify BackColor = &H00C0C0FF& Caption = "วันที่สั่งซื้อ" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 375 Left = 600 TabIndex = 35 Top = 600 Width = 975 End End Begin VB.TextBox Text7 Alignment = 1 'Right Justify BackColor = &H00C0FFFF& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 360 Left = 5520 TabIndex = 9 Top = 3720 Width = 975 End Begin VB.TextBox Text14 BackColor = &H00C0FFFF& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 360 Left = 2040 TabIndex = 12 Top = 4455 Width = 4695 End Begin VB.TextBox Text10 BackColor = &H00C0FFFF& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 360 Left = 2040 TabIndex = 10 Top = 4080 Width = 4695 End Begin VB.TextBox Mask1 BackColor = &H00C0FFFF& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 360 Left = 2040 Locked = -1 'True MaxLength = 10 TabIndex = 8 Top = 3720 Width = 1455 End Begin VB.TextBox Mask2 BackColor = &H00C0FFFF& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 360 Left = 2040 MaxLength = 9 TabIndex = 6 Top = 3360 Width = 1455 End Begin VB.TextBox Text2 BackColor = &H00C0FFFF& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 375 Left = 2040 TabIndex = 2 Top = 1800 Width = 7695 End Begin VB.TextBox Text3 BackColor = &H00E0E0E0& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 375 Left = 2040 TabIndex = 3 Top = 2160 Width = 7695 End Begin VB.TextBox Text4 BackColor = &H00C0FFFF& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 375 Left = 2040 TabIndex = 4 Top = 2520 Width = 7695 End Begin VB.TextBox Text5 BackColor = &H00C0FFFF& BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 375 Left = 2040 TabIndex = 5 Top = 2880 Width = 7695 End Begin MSDataListLib.DataList dlbtypemag Bindings = "New_Journal.frx":14B7 DataField = "Type_Code" DataSource = "Adotypemag" Height = 1020 Left = 4680 TabIndex = 24 Top = 7440 Visible = 0 'False Width = 2775 _ExtentX = 4895 _ExtentY = 1799 _Version = 393216 ForeColor = 8388608 ListField = "Type_Thai_Descrition" BoundColumn = "Type_Code" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin MSDataListLib.DataCombo dcbmagtype Bindings = "New_Journal.frx":14D0 DataSource = "Adomagtype" Height = 360 Left = 5520 TabIndex = 7 Top = 3360 Width = 2175 _ExtentX = 3836 _ExtentY = 635 _Version = 393216 BackColor = 12648447 ForeColor = 8388608 ListField = "MagType_Thai_Des" BoundColumn = "MagType_Code" Text = "" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin MSDataListLib.DataCombo dcbstatus DataSource = "Adostatu" Height = 360 Left = 2040 TabIndex = 14 Top = 5160 Width = 2655 _ExtentX = 4683 _ExtentY = 635 _Version = 393216 BackColor = 12648447 ForeColor = 8388608 Text = "" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin MSDataListLib.DataCombo dcbrecei Height = 360 Left = 2040 TabIndex = 15 Top = 5520 Width = 2655 _ExtentX = 4683 _ExtentY = 635 _Version = 393216 BackColor = 12648447 ForeColor = 8388608 Text = "" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin MSDataListLib.DataCombo dcbdepart Height = 360 Left = 2040 TabIndex = 13 Top = 4800 Width = 3615 _ExtentX = 6376 _ExtentY = 635 _Version = 393216 BackColor = 12648447 ForeColor = 8388608 Text = "" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin MSDataListLib.DataCombo DataCombo2 Height = 360 Left = 2040 TabIndex = 66 Top = 5880 Width = 3015 _ExtentX = 5318 _ExtentY = 635 _Version = 393216 BackColor = 12648447 ForeColor = 12582912 Text = "" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin VB.Label label1 BackColor = &H80000000& Caption = "สถานที่เก็บตัวเล่ม" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 495 Left = 5160 TabIndex = 55 Top = 5880 Width = 1455 End Begin VB.Label Label19 BackColor = &H8000000A& Caption = "สถานที่จัดเก็บ :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 720 TabIndex = 65 Top = 5880 Width = 1215 End Begin VB.Label Label13 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "สาขาวิชา :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 255 Left = 4920 TabIndex = 63 Top = 5160 Width = 975 End Begin VB.Label Label12 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "สีปกเมื่อรวมเล่ม :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 255 Left = 4680 TabIndex = 56 Top = 5520 Width = 1455 End Begin VB.Label Label15 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "คณะวิชาที่บอกรับ :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 375 Left = -240 TabIndex = 33 Top = 4800 Width = 2175 End Begin VB.Label Label16 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "สถานภาพการบอกรับ :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 375 Left = 0 TabIndex = 32 Top = 5520 Width = 1935 End Begin VB.Label Label17 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "จำนวน Copy/ปี" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 375 Left = 3960 TabIndex = 31 Top = 3720 Width = 1455 End Begin VB.Label Label23 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "ผู้จัดจำหน่าย :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 255 Left = 600 TabIndex = 30 Top = 4440 Width = 1335 End Begin VB.Label Label24 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "สถานภาพสมาชิก :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 375 Left = -120 TabIndex = 29 Top = 5160 Width = 2055 End Begin VB.Label Label8 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "วันที่เริ่มบอกรับ :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 255 Left = 480 TabIndex = 28 Top = 3720 Width = 1455 End Begin VB.Label Label9 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "ISSN :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 255 Left = 1080 TabIndex = 27 Top = 3360 Width = 855 End Begin VB.Label Label10 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "กำหนดออก" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 375 Left = 4440 TabIndex = 26 Top = 3360 Width = 975 End Begin VB.Label Label14 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "ผู้จัดพิมพ์ :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 375 Left = 960 TabIndex = 25 Top = 4080 Width = 975 End Begin VB.Label Label4 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "ชื่อเทียบเคียง :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 255 Left = 720 TabIndex = 23 Top = 2160 Width = 1215 End Begin VB.Label Label5 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "ปีพิมพ์ - ฉบับที่" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 375 Left = 360 TabIndex = 22 Top = 2520 Width = 1575 End Begin VB.Label Label6 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "ชื่อย่อ :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 375 Left = 1320 TabIndex = 21 Top = 2880 Width = 615 End Begin VB.Label Label3 Alignment = 1 'Right Justify BackColor = &H80000000& Caption = "ชื่อวารสาร :" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000040& Height = 375 Left = 600 TabIndex = 20 Top = 1800 Width = 1335 End End Attribute VB_Name = "New_Journal" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim Conn As New ADODB.Connection Dim langtab As New ADODB.Recordset Dim typemagtab As New ADODB.Recordset Dim magtypetab As New ADODB.Recordset Dim deparmentab As New ADODB.Recordset Dim receivetab As New ADODB.Recordset Dim statustab As New ADODB.Recordset Dim bindcolortab As New ADODB.Recordset Dim magazinetab As New ADODB.Recordset Dim dealertab As New ADODB.Recordset Dim setpointertab As New ADODB.Recordset Dim locate As New ADODB.Recordset Dim depart1 As New ADODB.Recordset Dim locatab As New ADODB.Recordset Dim chktext As String Dim chkdate As String Dim cadd As Boolean Dim cedit As Boolean Dim checkdata As Boolean Private Sub Cmdadd_Click() Call resetbuttom(False, False, False, True, True, False) Cmdsave.Enabled = True Call cleardata cadd = True cedit = False Call unlockinput opt1.SetFocus End Sub Private Sub Cmdcancle_Click() If MsgBox("ต้องการยกเลิกข้อมูลหรือไม่", vbInformation + vbOKCancel, "ยกเลิกข้อมูล") = vbOK Then Call resetbuttom(True, False, False, False, False, True) Call cleardata Call lockinput Text1.Text = "" Text2.SetFocus End If End Sub Private Sub Cmddel_Click() If MsgBox("ต้องการลบข้อมูลหรือไม่", vbInformation + vbOKCancel, "ลบข้อมูล") = vbOK Then Set magazinetab = New ADODB.Recordset With magazinetab If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .LockType = adLockOptimistic .Open "select * from magazine where pointer='" & Text1.Text & "'" If Not .EOF Then .Delete End If .Close End With Set magazinetab = Nothing MsgBox "ลบข้อมูลเรียบร้อแล้ว", vbInformation + vbOKOnly, "แจ้งผลการลบข้อมูล" Call cleardata Call lockinput Text1.Text = "" Text2.SetFocus End If End Sub Private Sub Cmdedit_Click() Call resetbuttom(False, False, False, True, True, False) Cmdsave.Enabled = True cadd = False cedit = True Call unlockinput Text2.SetFocus End Sub Private Sub Cmdsave_Click() Dim fldno As Integer If MsgBox("ต้องการบันทึกข้อมูลหรือไม่", vbInformation + vbOKCancel, "บันทึกข้อมูล") = vbOK Then If cadd = True Then With magazinetab If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select * from magazine where trim(magazine_name)='" & Text2.Text & "' " If Not .EOF Then MsgBox "พบวารสารรายชื่อนี้ในฐานข้อมูล ไม่สามารถทำการเพิ่มรายชื่อใหม่ได้", vbCritical + vbOKOnly, "การบันทึกข้อมูลล้มเหลว" 'Call cleardata Text2.SetFocus Exit Sub End If .Close End With End If Set magazinetab = Nothing ' ตรวจสอบการกรอกข้อมูล checkdata = True Call checkinput If checkdata = False Then Exit Sub ' genarate pointer If opt1.Value = True Then ' วารสาร If dcblanguage.BoundText = "01" Then fldno = 1 Else fldno = 2 End If Else ' หนังสือพิมพ์ If dcblanguage.BoundText = "01" Then fldno = 3 Else fldno = 4 End If End If If cadd = True Then updatepointer (fldno) Call updatemagazine Call resetbuttom(True, False, False, False, False, True) MsgBox "การบันทึกข้อมูลวารสารรายชื่อใหม่เรียบร้อยแล้ว", vbInformation + vbOKOnly, "ผลการบันทึกข้อมูล" Call cleardata Call lockinput End If End Sub Private Sub Command1_Click() MonthView2.Value = Now MonthView2.Visible = True End Sub Private Sub Command2_Click() chkdate = "oderdate" MonthView1.Value = Now MonthView1.Visible = True End Sub Private Sub Command3_Click() chkdate = "enddate" MonthView1.Value = Now MonthView1.Visible = True End Sub Private Sub Command4_Click() End Sub Private Sub Command6_Click() Unload Me End Sub Private Sub dcbrecei_Change() If dcbrecei.Text = "เป็นสมาชิก" Then Frame2.Visible = True Else Frame2.Visible = False End If End Sub Private Sub dlbdealer_Click() dlbdealer.Visible = False If chktext = "text14" Then Text14.Text = dlbdealer.Text Text9.Text = dlbdealer.BoundText End If If chktext = "text10" Then Text10.Text = dlbdealer.Text Text8.Text = dlbdealer.BoundText End If End Sub Private Sub dlbnamemag_Click() Dim sqlmagazine1 As New ADODB.Recordset Dim sqlmagazine As New ADODB.Recordset Dim sqltypeclass As New ADODB.Recordset Dim sql1 As String Dim sql2 As String Text1.Text = dlbnamemag.BoundText Text2.Text = dlbnamemag.Text dlbnamemag.Visible = False Call cleardata sql1 = sql1 & "select * from magazine where pointer='" & Trim(Text1.Text) & "'" With sqlmagazine1 If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open sql1 If Not .EOF Then Text1.Text = .Fields(0).Value Select Case Left(Text1.Text, 1) Case "J", "I" opt1.Value = True opt2.Value = False Case "K", "L" opt1.Value = False opt2.Value = True End Select Text2.Text = .Fields(1).Value If Not IsNull(.Fields(2)) Then Text3.Text = .Fields(2).Value If Not IsNull(.Fields(3)) Then Text4.Text = .Fields(3).Value If Not IsNull(.Fields(4)) Then Text5.Text = .Fields(4).Value Mask1.Text = Format(.Fields(15).Value, "dd/mm/yyyy") ' + Trim(Str(Year(.Fields(5).Value))) Mask2.Text = Format(.Fields(5).Value, "9999-9999") Text7.Text = .Fields(13).Value Text11.Text = .Fields(14).Value Mask5.Text = .Fields(17).Value Mask4.Text = .Fields(16).Value Text8.Text = .Fields(9).Value Text9.Text = .Fields(18).Value If Not IsNull(.Fields(20)) Then Text6.Text = .Fields(20).Value Set dealertab = New ADODB.Recordset With dealertab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From dealer where publisher_code='" & sqlmagazine1.Fields(9).Value & "'", Conn, adOpenForwardOnly, adLockReadOnly If Not .EOF Then Text10.Text = .Fields(1).Value .Close End With Set dealertab = Nothing Set dealertab = New ADODB.Recordset With dealertab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From dealer where publisher_code='" & sqlmagazine1.Fields(18).Value & "'", Conn, adOpenForwardOnly, adLockReadOnly If Not .EOF Then Text14.Text = .Fields(1).Value .Close End With Set dealertab = Nothing Set magtypetab = New ADODB.Recordset With magtypetab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From typemag where type_code='" & sqlmagazine1.Fields(6).Value & "'", Conn, adOpenForwardOnly, adLockReadOnly If Not .EOF Then dcbtypemag.Text = .Fields(1).Value .Close End With Set magtypetab = Nothing Set langtab = New ADODB.Recordset With langtab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From language where language_code='" & sqlmagazine1.Fields(7).Value & "'", Conn, adOpenForwardOnly, adLockReadOnly If Not .EOF Then dcblanguage.Text = .Fields(1).Value .Close End With Set langtab = Nothing Set magtypetab = New ADODB.Recordset With magtypetab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From magtype where magtype_code='" & sqlmagazine1.Fields(8).Value & "'", Conn, adOpenForwardOnly, adLockReadOnly If Not .EOF Then dcbmagtype.Text = .Fields(1).Value .Close End With Set magtypetab = Nothing Set deparmentab = New ADODB.Recordset With deparmentab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From department where department_code='" & sqlmagazine1.Fields(10).Value & "'", Conn, adOpenForwardOnly, adLockReadOnly If Not .EOF Then dcbdepart.Text = .Fields(1).Value .Close End With Set deparmentab = Nothing Set statustab = New ADODB.Recordset With statustab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From statustype where status_code='" & sqlmagazine1.Fields(19).Value & "'", Conn, adOpenForwardOnly, adLockReadOnly If Not .EOF Then dcbstatus.Text = .Fields(1).Value .Close End With Set statustab = Nothing Set receivetab = New ADODB.Recordset With receivetab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From receives where receivestatus='" & sqlmagazine1.Fields(11).Value & "'", Conn, adOpenForwardOnly, adLockReadOnly If Not .EOF Then dcbrecei.Text = .Fields(1).Value .Close End With Set receivetab = Nothing Set bindcolortab = New ADODB.Recordset With bindcolortab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From Bindcolor where bindtype_code='" & sqlmagazine1.Fields(12).Value & "'", Conn, adOpenForwardOnly, adLockReadOnly If Not .EOF Then dcbbindcolor.Text = .Fields(1).Value .Close End With Set bindcolortab = Nothing Set depart1 = New ADODB.Recordset With locate If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From department1 where depcode='" & sqlmagazine1.Fields(21).Value & "'", Conn, adOpenForwardOnly, adLockReadOnly If Not .EOF Then DataCombo1.Text = .Fields(1).Value .Close End With Set depart1 = Nothing Set locatab = New ADODB.Recordset With locate If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From location where locate_id='" & sqlmagazine1.Fields(22).Value & "'", Conn, adOpenForwardOnly, adLockReadOnly If Not .EOF Then DataCombo2.Text = .Fields(1).Value .Close End With Set locatab = Nothing Call resetbuttom(False, True, True, False, True, False) End If End With End Sub Private Sub Form_Load() Set Conn = New ADODB.Connection Conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _ & "SERVER=192.168.1.15;" _ & "DATABASE=magazine;" _ & "UID=chaiya;" _ & "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384 Conn.CursorLocation = adUseClient Conn.Mode = adModeUnknown Conn.Open Set langtab = New ADODB.Recordset With langtab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From Language", Conn, adOpenForwardOnly, adLockReadOnly End With Set dcblanguage.RowSource = langtab dcblanguage.ListField = "LangDesTh" dcblanguage.BoundColumn = "Language_Code" Set typemagtab = New ADODB.Recordset With typemagtab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From typemag", Conn, adOpenForwardOnly, adLockReadOnly End With Set dcbtypemag.RowSource = typemagtab dcbtypemag.ListField = "Type_Thai_Descrition" dcbtypemag.BoundColumn = "Type_Code" Set magtypetab = New ADODB.Recordset With magtypetab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From magtype", Conn, adOpenForwardOnly, adLockReadOnly End With Set dcbmagtype.RowSource = magtypetab dcbmagtype.ListField = "MagType_Thai_Des" dcbmagtype.BoundColumn = "MagType_Code" Set deparmentab = New ADODB.Recordset With deparmentab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From department", Conn, adOpenForwardOnly, adLockReadOnly End With Set dcbdepart.RowSource = deparmentab dcbdepart.ListField = "Department_Thai_Des" dcbdepart.BoundColumn = "Department_Code" Set receivetab = New ADODB.Recordset With receivetab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From receives", Conn, adOpenForwardOnly, adLockReadOnly End With Set dcbrecei.RowSource = receivetab dcbrecei.ListField = "receivestatusdes" dcbrecei.BoundColumn = "receivestatus" Set statustab = New ADODB.Recordset With statustab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From statustype", Conn, adOpenForwardOnly, adLockReadOnly End With Set dcbstatus.RowSource = statustab dcbstatus.ListField = "Status_thai_Descrition" dcbstatus.BoundColumn = "Status_code" Set bindcolortab = New ADODB.Recordset With bindcolortab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From Bindcolor", Conn, adOpenForwardOnly, adLockReadOnly End With Set dcbbindcolor.RowSource = bindcolortab dcbbindcolor.ListField = "BindColor_DesTh" dcbbindcolor.BoundColumn = "BindType_code" Set depart1 = New ADODB.Recordset With depart1 If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From department1", Conn, adOpenForwardOnly, adLockReadOnly End With Set DataCombo1.RowSource = depart1 DataCombo1.ListField = "depname" DataCombo1.BoundColumn = "depcode" Set locatab = New ADODB.Recordset With locatab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "Select * From Location", Conn, adOpenForwardOnly, adLockReadOnly End With Set DataCombo2.RowSource = locatab DataCombo2.ListField = "Locate_type" DataCombo2.BoundColumn = "Locate_id" Call lockinput End Sub Private Sub Mask2_KeyPress(KeyAscii As Integer) If KeyAscii > 26 Then If Len(Trim(Mask2)) = 4 Then Mask2.Text = Trim(Mask2.Text) + "-" Mask2.SelStart = Len(Trim(Mask2.Text)) End If End If End Sub Private Sub MonthView1_DateClick(ByVal DateClicked As Date) If chkdate = "oderdate" Then Mask5.Text = Format(DateClicked, "DD/MM/YYYY") If chkdate = "enddate" Then Mask4.Text = Format(DateClicked, "DD/MM/YYYY") MonthView1.Visible = False End Sub Private Sub MonthView2_DateClick(ByVal DateClicked As Date) Mask1.Text = Format(DateClicked, "DD/MM/YYYY") MonthView2.Visible = False End Sub Private Sub Text10_DblClick() chktext = "text10" With dealertab If .State = adStateOpen Then .Close .CursorLocation = adUseClient .Open "select publisher_code,publisher_Name from dealer Where publisher_Name LIKE '%" & Text10.Text & "%'", Conn, adOpenForwardOnly, adLockReadOnly If Not .EOF Then dlbdealer.Visible = True Set dlbdealer.RowSource = dealertab dlbdealer.ListField = "publisher_name" dlbdealer.BoundColumn = "publisher_Code" Else Adddealer.Text2.Text = Text10.Text new_dealer = "T" Adddealer.Show End If End With End Sub Private Sub Text14_DblClick() chktext = "text14" With dealertab If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select publisher_code,publisher_Name from dealer Where publisher_Name LIKE '%" & Text14.Text & "%'" If Not .EOF Then dlbdealer.Visible = True Set dlbdealer.RowSource = dealertab dlbdealer.ListField = "publisher_name" dlbdealer.BoundColumn = "publisher_Code" Else Adddealer.Text2.Text = Text14.Text new_dealer = "T" Adddealer.Show End If End With MonthView1.Value = Now MonthView2.Value = Now End Sub Private Sub Text2_DblClick() With magazinetab If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select pointer,Magazine_Name from magazine Where Magazine_Name LIKE '%" & Text2.Text & "%'" If Not .EOF Then dlbnamemag.Visible = True Set dlbnamemag.RowSource = magazinetab dlbnamemag.ListField = "Magazine_name" dlbnamemag.BoundColumn = "Pointer" Else MsgBox "ไม่พบข้อมูลที่ต้องการค้นหา กรุณาตรวจสอบอีกครั้ง", vbCritical + vbOKOnly, "ผลการค้นหา" Text2.Text = "" Text2.SetFocus End If End With End Sub Sub lockinput() opt1.Enabled = False opt2.Enabled = False Text1.Locked = True Text3.BackColor = &HE0E0E0 Text3.Locked = True Text4.BackColor = &HE0E0E0 Text4.Locked = True Text5.BackColor = &HE0E0E0 Text5.Locked = True Text7.BackColor = &HE0E0E0 Text7.Locked = True Text10.BackColor = &HE0E0E0 Text10.Locked = True Text14.BackColor = &HE0E0E0 Text14.Locked = True Text11.BackColor = &HE0E0E0 Text11.Locked = True Text6.BackColor = &HE0E0E0 Text6.Locked = True Mask1.BackColor = &HE0E0E0 Mask1.Locked = True Mask2.BackColor = &HE0E0E0 Mask2.Locked = True Mask4.BackColor = &HE0E0E0 Mask4.Locked = True Mask5.BackColor = &HE0E0E0 Mask5.Locked = True dcblanguage.BackColor = &HE0E0E0 dcblanguage.Locked = True dcbtypemag.BackColor = &HE0E0E0 dcbtypemag.Locked = True dcbmagtype.BackColor = &HE0E0E0 dcbmagtype.Locked = True dcbdepart.BackColor = &HE0E0E0 dcbdepart.Locked = True dcbrecei.BackColor = &HE0E0E0 dcbrecei.Locked = True dcbstatus.BackColor = &HE0E0E0 dcbstatus.Locked = True dcbbindcolor.BackColor = &HE0E0E0 dcbbindcolor.Locked = True DataCombo1.BackColor = &HE0E0E0 DataCombo1.Locked = True DataCombo2.BackColor = &HE0E0E0 DataCombo2.Locked = True End Sub Sub unlockinput() opt1.Enabled = True opt2.Enabled = True Text1.Locked = False Text3.BackColor = &HC0FFFF Text3.Locked = False Text4.BackColor = &HC0FFFF Text4.Locked = False Text5.BackColor = &HC0FFFF Text5.Locked = False Text7.BackColor = &HC0FFFF Text7.Locked = False Text10.BackColor = &HC0FFFF Text10.Locked = False Text14.BackColor = &HC0FFFF Text14.Locked = False Text11.BackColor = &HC0FFFF Text11.Locked = False Text6.BackColor = &HC0FFFF Text6.Locked = False Mask1.BackColor = &HC0FFFF Mask1.Locked = False Mask2.BackColor = &HC0FFFF Mask2.Locked = False Mask4.BackColor = &HC0FFFF Mask4.Locked = False Mask5.BackColor = &HC0FFFF Mask5.Locked = False dcblanguage.BackColor = &HC0FFFF dcblanguage.Locked = False dcbtypemag.BackColor = &HC0FFFF dcbtypemag.Locked = False dcbmagtype.BackColor = &HC0FFFF dcbmagtype.Locked = False dcbdepart.BackColor = &HC0FFFF dcbdepart.Locked = False dcbrecei.BackColor = &HC0FFFF dcbrecei.Locked = False dcbstatus.BackColor = &HC0FFFF dcbstatus.Locked = False dcbbindcolor.BackColor = &HC0FFFF dcbbindcolor.Locked = False DataCombo1.BackColor = &HC0FFFF DataCombo1.Locked = False DataCombo2.BackColor = &HC0FFFF DataCombo2.Locked = False End Sub Sub cleardata() opt1.Enabled = False opt2.Enabled = False Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text7.Text = "1" Text10.Text = "" Text14.Text = "" Text11.Text = "0" Text6.Text = "" Mask1.Text = "" Mask2.Text = "" Mask4.Text = "" Mask5.Text = "" dcblanguage.Text = "" dcbtypemag.Text = "" dcbmagtype.Text = "" dcbdepart.Text = "" dcbrecei.Text = "" dcbstatus.Text = "" dcbbindcolor.Text = "" DataCombo2.Text = "" DataCombo1.Text = "" End Sub Sub resetbuttom(b1 As Boolean, b2 As Boolean, b3 As Boolean, b4 As Boolean, b5 As Boolean, b6 As Boolean) Cmdadd.Enabled = b1 Cmdedit.Enabled = b2 Cmddel.Enabled = b3 Cmdsave.Enabled = b4 Cmdcancle.Enabled = b5 End Sub Sub updatemagazine() With magazinetab If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .LockType = adLockOptimistic If cadd = True Then .Open "select * from magazine " .AddNew End If If cedit = True Then .Open "select * from magazine where pointer='" & Text1.Text & "'" End If .Fields(0).Value = Trim(Text1.Text) .Fields(1).Value = Trim(Text2.Text) .Fields(2).Value = Trim(Text3.Text) .Fields(3).Value = Trim(Text4.Text) .Fields(4).Value = Trim(Text5.Text) .Fields(5).Value = Trim(Mask2.Text) .Fields(6).Value = Trim(dcbtypemag.BoundText) .Fields(7).Value = Trim(dcblanguage.BoundText) .Fields(8).Value = Trim(dcbmagtype.BoundText) .Fields(9).Value = Trim(Text8.Text) .Fields(10).Value = Trim(dcbdepart.BoundText) .Fields(11).Value = Trim(dcbrecei.BoundText) .Fields(12).Value = Trim(dcbbindcolor.BoundText) .Fields(13).Value = Trim(Text7.Text) .Fields(14).Value = Trim(Text11.Text) .Fields(21).Value = Trim(DataCombo1.BoundText) .Fields(15).Value = Format(Trim(Mask1.Text), "dd/mm/yyyy") If Mask4.Text = "" Then .Fields(16).Value = Format(Date, "dd/mm/yyyy") .Fields(17).Value = Format(Date, "dd/mm/yyyy") Else .Fields(16).Value = Format(Trim(Mask4.Text), "dd/mm/yyyy") .Fields(17).Value = Format(Trim(Mask5.Text), "dd/mm/yyyy") End If .Fields(18).Value = Trim(Text9.Text) .Fields(19).Value = Trim(dcbstatus.BoundText) .Fields(20).Value = Trim(Text6.Text) .Fields(22).Value = Trim(DataCombo2.BoundText) .Update .Close End With Set magazinetab = Nothing End Sub Sub checkinput() If (opt1.Value = False) And (opt2.Value = False) Then MsgBox "กรุณาเลือกประเภทสิ่งพิมพ์ ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" opt1.SetFocus checkdata = False ElseIf Len(Trim(dcbtypemag.Text)) = 0 Then MsgBox "กรุณาเลือกชนิดสิ่งพิมพ์ ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" dlbtypemag.SetFocus checkdata = False ElseIf Len(Trim(Text2.Text)) = 0 Then MsgBox "กรุณากรอกข้อมูลช่อง ชื่อวารสาร/หนังสือพิมพ์ ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" Text2.SetFocus checkdata = False ElseIf Len(Trim(dcblanguage.Text)) = 0 Then MsgBox "กรุณาเลือกภาษา วารสาร/หนังสือพิมพ์ ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" dcblanguage.SetFocus checkdata = False ElseIf Len(Trim(dcbmagtype.Text)) = 0 Then MsgBox "กรุณาเลือกกำหนดการออก วารสาร/หนังสือพิมพ์ ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" dcbmagtype.SetFocus checkdata = False ElseIf Len(Trim(Text10.Text)) = 0 Then MsgBox "กรุณากรอกข้อมูลช่อง ผู้จัดพิมพ์ ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" Text10.SetFocus checkdata = False ElseIf Len(Trim(dcbdepart.Text)) = 0 Then MsgBox "กรุณาเลือก คณะ/หน่วยงานที่บอกรับ ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" dcbdepart.SetFocus checkdata = False ElseIf Len(Trim(dcbrecei.Text)) = 0 Then MsgBox "กรุณาเลือก สถานภาพการบอกรับ ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" dcbrecei.SetFocus checkdata = False ElseIf Len(Trim(Text14.Text)) = 0 Then MsgBox "กรุณาเลือก ผู้จัดจำหน่าย ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" Text14.SetFocus checkdata = False ElseIf Len(Trim(dcbstatus.Text)) = 0 Then MsgBox "กรุณาเลือก สถานภาพสมาชิก", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" dcbstatus.SetFocus checkdata = False ElseIf Len(Trim(dcbbindcolor.BoundText)) = 0 Then MsgBox "กรุณาเลือก สีปก", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" dcbbindcolor.SetFocus checkdata = False End If If Len(Trim(Text3.Text)) = 0 Then Text3.Text = " " If Len(Trim(Text4.Text)) = 0 Then Text4.Text = " " If Len(Trim(Text5.Text)) = 0 Then Text5.Text = " " End Sub Sub updatepointer(recnum As Integer) Dim n As Integer Dim run_pointer As Integer Dim s_point As String With setpointertab If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .LockType = adLockOptimistic .Open "select * from recsetup" Text1.Text = setpointertab.Fields(recnum).Value run_pointer = Val(Right(Trim(Text1.Text), 6)) + 1 s_point = Trim(Str(run_pointer)) For n = 1 To 6 - Len(s_point) s_point = "0" + s_point Next n setpointertab.Fields(recnum).Value = Left(Trim(Text1.Text), 1) + s_point .Update .Close End With Set setpointertab = Nothing End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Call Text2_DblClick End Sub