VERSION 5.00 Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx" Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "tabctl32.ocx" Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "msdatlst.ocx" Begin VB.Form NewJournal BackColor = &H00C0C0C0& Caption = "บันทึกข้อมูลวารสารใหม่" ClientHeight = 8430 ClientLeft = 60 ClientTop = 345 ClientWidth = 11880 LinkTopic = "Form1" MDIChild = -1 'True ScaleHeight = 8430 ScaleWidth = 11880 WindowState = 2 'Maximized Begin MSAdodcLib.Adodc Adobindstat Height = 330 Left = 8400 Top = 8160 Visible = 0 'False Width = 1695 _ExtentX = 2990 _ExtentY = 582 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Mode=Read;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Mode=Read;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "select * from bindtype" Caption = "Adobindstat" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin MSAdodcLib.Adodc Adobindcolor Height = 330 Left = 8400 Top = 7800 Visible = 0 'False Width = 1695 _ExtentX = 2990 _ExtentY = 582 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Mode=Read;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Mode=Read;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "select * from bindcolor" Caption = "Adobindcolor" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin MSAdodcLib.Adodc Adostatu Height = 330 Left = 6240 Top = 8160 Visible = 0 'False Width = 2175 _ExtentX = 3836 _ExtentY = 582 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Mode=Read;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Mode=Read;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "select * from statustype" Caption = "Adostatu" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin MSAdodcLib.Adodc Adocurren Height = 330 Left = 6240 Top = 7800 Visible = 0 'False Width = 2175 _ExtentX = 3836 _ExtentY = 582 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Mode=Read;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Mode=Read;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "select * from currmony" Caption = "Adocurren" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin MSAdodcLib.Adodc Adorecei Height = 330 Left = 4080 Top = 8160 Visible = 0 'False Width = 2175 _ExtentX = 3836 _ExtentY = 582 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Mode=Read;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Mode=Read;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "select * from receives" Caption = "Adorecei" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin MSAdodcLib.Adodc Adodepart Height = 330 Left = 4080 Top = 7800 Visible = 0 'False Width = 2175 _ExtentX = 3836 _ExtentY = 582 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "select * from department" Caption = "Adodepart" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin MSAdodcLib.Adodc Adodc1 Height = 330 Left = 1920 Top = 8160 Visible = 0 'False Width = 2175 _ExtentX = 3836 _ExtentY = 582 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "select publisher_code,Publisher_name from dealer" Caption = "Adodc1" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin MSAdodcLib.Adodc Adomaglang Height = 330 Left = 1920 Top = 7800 Visible = 0 'False Width = 2175 _ExtentX = 3836 _ExtentY = 582 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "select * from maglang" Caption = "Adomaglang" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin MSAdodcLib.Adodc Adomagtype Height = 330 Left = 0 Top = 8160 Visible = 0 'False Width = 1935 _ExtentX = 3413 _ExtentY = 582 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "select * from magtype" Caption = "Adomagtype" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin MSAdodcLib.Adodc Adotypemag Height = 330 Left = 0 Top = 7800 Visible = 0 'False Width = 1935 _ExtentX = 3413 _ExtentY = 582 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\LIBRARY\DATABASE\MAGAZINE.MDB;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "select * from typemag" Caption = "Adotypemag" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 222 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin VB.Frame Frame3 Height = 6360 Left = 10080 TabIndex = 31 Top = 1560 Width = 1695 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 = 855 Left = 120 Picture = "NewJournal.frx":0000 Style = 1 'Graphical TabIndex = 61 Top = 4200 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 = 855 Left = 120 Picture = "NewJournal.frx":030A Style = 1 'Graphical TabIndex = 60 Top = 3240 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 = 855 Left = 120 Picture = "NewJournal.frx":0614 Style = 1 'Graphical TabIndex = 36 Top = 5160 Width = 1455 End Begin VB.CommandButton Cmdsearch BackColor = &H00C0FFC0& Caption = "Search" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 855 Left = 120 Picture = "NewJournal.frx":0A56 Style = 1 'Graphical TabIndex = 35 Top = 3240 Visible = 0 'False 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 = 855 Left = 120 Picture = "NewJournal.frx":0D60 Style = 1 'Graphical TabIndex = 34 Top = 2280 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 = 855 Left = 120 Picture = "NewJournal.frx":11A2 Style = 1 'Graphical TabIndex = 33 Top = 1320 Width = 1455 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 = 855 Left = 120 MaskColor = &H00C0FFFF& Picture = "NewJournal.frx":14AC Style = 1 'Graphical TabIndex = 32 Top = 360 Width = 1455 End End Begin TabDlg.SSTab SSTab1 Height = 6015 Left = 720 TabIndex = 19 Top = 1800 Width = 9255 _ExtentX = 16325 _ExtentY = 10610 _Version = 393216 Tabs = 2 TabsPerRow = 2 TabHeight = 520 ForeColor = 8388608 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 TabCaption(0) = "หน้าที่1" TabPicture(0) = "NewJournal.frx":17B6 Tab(0).ControlEnabled= -1 'True Tab(0).Control(0)= "Label4" Tab(0).Control(0).Enabled= 0 'False Tab(0).Control(1)= "Label5" Tab(0).Control(1).Enabled= 0 'False Tab(0).Control(2)= "Label6" Tab(0).Control(2).Enabled= 0 'False Tab(0).Control(3)= "Label8" Tab(0).Control(3).Enabled= 0 'False Tab(0).Control(4)= "Label9" Tab(0).Control(4).Enabled= 0 'False Tab(0).Control(5)= "Label10" Tab(0).Control(5).Enabled= 0 'False Tab(0).Control(6)= "Label11" Tab(0).Control(6).Enabled= 0 'False Tab(0).Control(7)= "Label12" Tab(0).Control(7).Enabled= 0 'False Tab(0).Control(8)= "Label13" Tab(0).Control(8).Enabled= 0 'False Tab(0).Control(9)= "Label14" Tab(0).Control(9).Enabled= 0 'False Tab(0).Control(10)= "Label3" Tab(0).Control(10).Enabled= 0 'False Tab(0).Control(11)= "Text2" Tab(0).Control(11).Enabled= 0 'False Tab(0).Control(12)= "Text3" Tab(0).Control(12).Enabled= 0 'False Tab(0).Control(13)= "Text4" Tab(0).Control(13).Enabled= 0 'False Tab(0).Control(14)= "Text5" Tab(0).Control(14).Enabled= 0 'False Tab(0).Control(15)= "Text8" Tab(0).Control(15).Enabled= 0 'False Tab(0).Control(16)= "Text9" Tab(0).Control(16).Enabled= 0 'False Tab(0).Control(17)= "Text10" Tab(0).Control(17).Enabled= 0 'False Tab(0).Control(18)= "dcblanguage" Tab(0).Control(18).Enabled= 0 'False Tab(0).Control(19)= "dcbmagtype" Tab(0).Control(19).Enabled= 0 'False Tab(0).Control(20)= "Frame4" Tab(0).Control(20).Enabled= 0 'False Tab(0).Control(21)= "dlbnamemag" Tab(0).Control(21).Enabled= 0 'False Tab(0).Control(22)= "Text6" Tab(0).Control(22).Enabled= 0 'False Tab(0).Control(23)= "Mask1" Tab(0).Control(23).Enabled= 0 'False Tab(0).Control(24)= "Mask2" Tab(0).Control(24).Enabled= 0 'False Tab(0).Control(25)= "dlbdeler" Tab(0).Control(25).Enabled= 0 'False Tab(0).ControlCount= 26 TabCaption(1) = "หน้าที่ 2" TabPicture(1) = "NewJournal.frx":17D2 Tab(1).ControlEnabled= 0 'False Tab(1).Control(0)= "dlbdeler1" Tab(1).Control(1)= "Text14" Tab(1).Control(2)= "Mask5" Tab(1).Control(3)= "Mask4" Tab(1).Control(4)= "Mask3" Tab(1).Control(5)= "Text13" Tab(1).Control(6)= "Text12" Tab(1).Control(7)= "Text11" Tab(1).Control(8)= "Text7" Tab(1).Control(9)= "dcbstatus" Tab(1).Control(10)= "dcbbindsta" Tab(1).Control(11)= "dcbbindco" Tab(1).Control(12)= "dcbdeler1" Tab(1).Control(13)= "dcbcurren" Tab(1).Control(14)= "dcbrecei" Tab(1).Control(15)= "dcbdepart" Tab(1).Control(16)= "Label7" Tab(1).Control(17)= "Label26" Tab(1).Control(18)= "Label25" Tab(1).Control(19)= "Label24" Tab(1).Control(20)= "Label23" Tab(1).Control(21)= "Label22" Tab(1).Control(22)= "Label21" Tab(1).Control(23)= "Label20" Tab(1).Control(24)= "Label19" Tab(1).Control(25)= "Label18" Tab(1).Control(26)= "Label17" Tab(1).Control(27)= "Label16" Tab(1).Control(28)= "Label15" Tab(1).ControlCount= 29 Begin MSDataListLib.DataList dlbdeler DataField = "publisher_Name" DataSource = "Adodc1" Height = 2220 Left = 3960 TabIndex = 14 Top = 840 Visible = 0 'False Width = 6135 _ExtentX = 10821 _ExtentY = 3916 _Version = 393216 BackColor = 12648447 ForeColor = 8388608 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 dlbdeler1 DataField = "publisher_Name" DataSource = "Adodc1" Height = 1740 Left = -71280 TabIndex = 71 Top = 3360 Visible = 0 'False Width = 4695 _ExtentX = 8281 _ExtentY = 3069 _Version = 393216 BackColor = 12648447 ForeColor = 8388608 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 Text14 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 = -71640 TabIndex = 70 Top = 4520 Width = 4695 End Begin VB.TextBox Mask5 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 = -71640 MaxLength = 10 TabIndex = 69 Top = 4140 Width = 1455 End Begin VB.TextBox Mask4 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 = -71640 MaxLength = 10 TabIndex = 68 Top = 3780 Width = 1455 End Begin VB.TextBox Mask3 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 = -71640 MaxLength = 10 TabIndex = 67 Top = 3420 Width = 1455 End Begin VB.TextBox Mask2 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 = 5400 MaxLength = 9 TabIndex = 66 Top = 3420 Width = 1575 End Begin VB.TextBox Mask1 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 = 2760 MaxLength = 10 TabIndex = 8 Top = 3420 Width = 1575 End Begin VB.TextBox Text13 Height = 375 Left = -66840 TabIndex = 65 Text = "Text13" Top = 4500 Visible = 0 'False Width = 855 End Begin VB.TextBox Text6 Height = 375 Left = 240 TabIndex = 64 Text = "Text6" Top = 4560 Visible = 0 'False Width = 1215 End Begin MSDataListLib.DataList dlbnamemag Height = 2220 Left = 2760 TabIndex = 63 Top = 840 Visible = 0 'False Width = 6135 _ExtentX = 10821 _ExtentY = 3916 _Version = 393216 ForeColor = 8388608 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 Text12 Alignment = 1 'Right Justify 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 ForeColor = &H00800000& Height = 375 Left = -71640 TabIndex = 54 Top = 3060 Width = 975 End Begin VB.Frame Frame4 Height = 135 Left = 120 TabIndex = 59 Top = 2940 Width = 9015 End Begin VB.TextBox Text11 Alignment = 1 'Right Justify 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 ForeColor = &H00800000& Height = 360 Left = -71640 TabIndex = 52 Top = 2340 Width = 975 End Begin VB.TextBox Text7 Alignment = 1 'Right Justify 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 ForeColor = &H00800000& Height = 360 Left = -71640 TabIndex = 51 Top = 1980 Width = 975 End Begin MSDataListLib.DataCombo dcbstatus DataSource = "Adostatu" Height = 360 Left = -71640 TabIndex = 56 Top = 4860 Width = 2655 _ExtentX = 4683 _ExtentY = 635 _Version = 393216 Enabled = 0 'False 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 dcbbindsta DataSource = "Adobindstat" Height = 360 Left = -71640 TabIndex = 57 Top = 5220 Width = 2175 _ExtentX = 3836 _ExtentY = 635 _Version = 393216 Enabled = 0 'False 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 dcbbindco DataSource = "Adobindcolor" Height = 360 Left = -71640 TabIndex = 58 Top = 5580 Width = 1335 _ExtentX = 2355 _ExtentY = 635 _Version = 393216 Enabled = 0 'False 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 dcbdeler1 DataSource = "Adodc1" Height = 360 Left = -70320 TabIndex = 55 Top = 5640 Visible = 0 'False Width = 4575 _ExtentX = 8070 _ExtentY = 635 _Version = 393216 Enabled = 0 'False 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 dcbcurren DataSource = "Adocurren" Height = 360 Left = -71640 TabIndex = 53 Top = 2700 Width = 2175 _ExtentX = 3836 _ExtentY = 635 _Version = 393216 Enabled = 0 'False 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 DataSource = "Adorecei" Height = 360 Left = -71640 TabIndex = 50 Top = 1620 Width = 2775 _ExtentX = 4895 _ExtentY = 635 _Version = 393216 Enabled = 0 'False 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 DataSource = "Adodepart" Height = 360 Left = -71640 TabIndex = 49 Top = 1260 Width = 3615 _ExtentX = 6376 _ExtentY = 635 _Version = 393216 Enabled = 0 'False 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 dcbmagtype Bindings = "NewJournal.frx":17EE DataSource = "Adomagtype" Height = 360 Left = 6120 TabIndex = 10 Top = 4020 Width = 2295 _ExtentX = 4048 _ExtentY = 635 _Version = 393216 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 dcblanguage DataSource = "Adomaglang" Height = 360 Left = 2760 TabIndex = 9 Top = 4020 Width = 2055 _ExtentX = 3625 _ExtentY = 635 _Version = 393216 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.TextBox Text10 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 ForeColor = &H00800000& Height = 375 Left = 2760 TabIndex = 13 Top = 5220 Width = 5775 End Begin VB.TextBox Text9 Alignment = 1 'Right Justify 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 ForeColor = &H00800000& Height = 375 Left = 7080 TabIndex = 12 Top = 4620 Width = 735 End Begin VB.TextBox Text8 Alignment = 1 'Right Justify 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 ForeColor = &H00800000& Height = 375 Left = 4200 TabIndex = 11 Top = 4620 Width = 735 End Begin VB.TextBox Text5 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 ForeColor = &H00800000& Height = 375 Left = 2760 TabIndex = 7 Top = 2460 Width = 4335 End Begin VB.TextBox Text4 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 ForeColor = &H00800000& Height = 375 Left = 2760 TabIndex = 6 Top = 1980 Width = 4335 End Begin VB.TextBox Text3 BackColor = &H00FFFFFF& 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 ForeColor = &H00800000& Height = 375 Left = 2760 TabIndex = 5 Top = 1500 Width = 4335 End Begin VB.TextBox Text2 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 = 2760 TabIndex = 4 Top = 1020 Width = 5295 End Begin VB.Label Label7 Alignment = 1 'Right Justify 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 = 375 Left = -73800 TabIndex = 62 Top = 4140 Width = 1935 End Begin VB.Label Label3 Alignment = 1 'Right Justify 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 = 375 Left = 360 TabIndex = 20 Top = 1020 Width = 2175 End Begin VB.Label Label26 Alignment = 1 'Right Justify 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 = -72600 TabIndex = 48 Top = 5580 Width = 735 End Begin VB.Label Label25 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 = -73200 TabIndex = 47 Top = 5220 Width = 1455 End Begin VB.Label Label24 Alignment = 1 'Right Justify 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 = 375 Left = -73560 TabIndex = 46 Top = 4860 Width = 1695 End Begin VB.Label Label23 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 = -73140 TabIndex = 45 Top = 4500 Width = 1335 End Begin VB.Label Label22 Alignment = 1 'Right Justify 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 = -73080 TabIndex = 44 Top = 3780 Width = 1215 End Begin VB.Label Label21 Alignment = 1 'Right Justify 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 = 375 Left = -73560 TabIndex = 43 Top = 3420 Width = 1695 End Begin VB.Label Label20 Alignment = 1 'Right Justify 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 = -72840 TabIndex = 42 Top = 3060 Width = 975 End Begin VB.Label Label19 Alignment = 1 'Right Justify 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 = -72720 TabIndex = 41 Top = 2700 Width = 855 End Begin VB.Label Label18 Alignment = 1 'Right Justify 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 = -73080 TabIndex = 40 Top = 2340 Width = 1215 End Begin VB.Label Label17 Alignment = 1 'Right Justify 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 Height = 375 Left = -73920 TabIndex = 39 Top = 1980 Width = 2055 End Begin VB.Label Label16 Alignment = 1 'Right Justify 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 = 375 Left = -73800 TabIndex = 38 Top = 1620 Width = 1935 End Begin VB.Label Label15 Alignment = 1 'Right Justify 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 = 375 Left = -74040 TabIndex = 37 Top = 1260 Width = 2175 End Begin VB.Label Label14 Alignment = 1 'Right Justify 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 = 375 Left = 1680 TabIndex = 30 Top = 5220 Width = 975 End Begin VB.Label Label13 Alignment = 1 'Right Justify Caption = "จำนวนVolume/ปี" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 5400 TabIndex = 29 Top = 4620 Width = 1575 End Begin VB.Label Label12 Alignment = 1 'Right Justify Caption = "จำนวนเล่ม/Volume" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 222 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 2040 TabIndex = 28 Top = 4560 Width = 1935 End Begin VB.Label Label11 Alignment = 1 'Right Justify 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 = 375 Left = 1680 TabIndex = 27 Top = 4020 Width = 855 End Begin VB.Label Label10 Alignment = 1 'Right Justify 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 = 375 Left = 4920 TabIndex = 26 Top = 4020 Width = 1095 End Begin VB.Label Label9 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 Height = 255 Left = 4560 TabIndex = 25 Top = 3420 Width = 615 End Begin VB.Label Label8 Alignment = 1 'Right Justify 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 = 375 Left = 840 TabIndex = 24 Top = 3420 Width = 1695 End Begin VB.Label Label6 Alignment = 1 'Right Justify 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 = 375 Left = 1680 TabIndex = 23 Top = 2460 Width = 855 End Begin VB.Label Label5 Alignment = 1 'Right Justify 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 = 375 Left = 1800 TabIndex = 22 Top = 1980 Width = 735 End Begin VB.Label Label4 Alignment = 1 'Right Justify 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 = 375 Left = 1440 TabIndex = 21 Top = 1500 Width = 1095 End End Begin VB.Frame Frame1 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 = 1215 Left = 4080 TabIndex = 0 Top = 240 Width = 2775 Begin VB.OptionButton opt2 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 = 375 Left = 480 TabIndex = 15 Top = 720 Width = 1935 End Begin VB.OptionButton opt1 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 = 375 Left = 480 TabIndex = 2 Top = 360 Width = 1335 End End Begin VB.Frame Frame2 Height = 1575 Left = 720 TabIndex = 16 Top = 0 Width = 10455 Begin MSDataListLib.DataList dlbtypemag Bindings = "NewJournal.frx":1807 DataField = "Type_Code" DataSource = "Adotypemag" Height = 1020 Left = 7440 TabIndex = 3 Top = 360 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 VB.TextBox Text1 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 = 1440 MaxLength = 7 TabIndex = 1 Top = 480 Width = 1815 End Begin VB.Label Label2 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 = 6840 TabIndex = 18 Top = 360 Width = 615 End Begin VB.Label Label1 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 = 360 TabIndex = 17 Top = 480 Width = 975 End End End Attribute VB_Name = "NewJournal" 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 typemagtb As New ADODB.Recordset Dim magtypetb As New ADODB.Recordset Dim maglangtb As New ADODB.Recordset Dim dealertb As New ADODB.Recordset Dim dealer1tb As New ADODB.Recordset Dim departtb As New ADODB.Recordset Dim receitb As New ADODB.Recordset Dim curretb As New ADODB.Recordset Dim statustb As New ADODB.Recordset Dim bindcotb As New ADODB.Recordset Dim bindstatb As New ADODB.Recordset Dim magazinetb As New ADODB.Recordset Dim magazine1tb As New ADODB.Recordset Dim typeclasstb As New ADODB.Recordset Dim setpointertb As New ADODB.Recordset Dim magazinelist As New ADODB.Recordset Dim checkdata As Boolean Dim cadd As Boolean Dim cedit As Boolean Dim checkd As Integer Sub checkdate(strdate As String) checkd = 0 If Val(Mid(strdate, 4, 2)) > 12 Then checkd = 1 End Sub Sub updatepointer(recnum As Integer) Dim n As Integer Dim run_pointer As Integer Dim s_point As String With setpointertb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .LockType = adLockOptimistic .Open "select * from recsetup" Text1.Text = setpointertb.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 setpointertb.Fields(recnum).Value = Left(Trim(Text1.Text), 1) + s_point .Update .Close End With Set setpointertb = Nothing End Sub Sub updatetypeclass() With typeclasstb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .LockType = adLockOptimistic If cadd = True Then .Open "select * from typeclass " .AddNew End If If cedit = True Then .Open "select * from typeclass where pointer='" & Text1.Text & "'" End If .Fields(0).Value = Trim(Text1.Text) .Fields(1).Value = Trim(dlbtypemag.BoundText) .Update .Close End With End Sub Sub updatemagazine1() With magazine1tb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .LockType = adLockOptimistic If cadd = True Then .Open "select * from magazine1 " .AddNew End If If cedit = True Then .Open "select * from magazine1 where pointer='" & Text1.Text & "'" End If .Fields(0).Value = Text1.Text .Fields(1).Value = Text2.Text .Fields(2).Value = Text3.Text .Fields(3).Value = Text4.Text .Fields(4).Value = Text5.Text .Fields(6).Value = Format(Trim(Mask1.Text), "dd/mm/yyyy") '+ Trim(Str(Val(Right(Trim(Mask1.Text), 4)) + 543)) .Fields(7).Value = Mask2.Text .Fields(8).Value = dcblanguage.BoundText .Fields(9).Value = dcbmagtype.BoundText .Fields(10).Value = Text8.Text .Fields(11).Value = Text9.Text .Fields(12).Value = Text6.Text .Update .Close End With Set magazine1tb = Nothing End Sub Sub updatemagazine() With magazinetb 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(dcbdepart.BoundText) .Fields(2).Value = Trim(dcbbindsta.BoundText) .Fields(3).Value = Trim(dcbrecei.BoundText) .Fields(4).Value = Trim(dcbbindco.BoundText) .Fields(5).Value = Trim(Text7.Text) .Fields(6).Value = Trim(Text11.Text) .Fields(7).Value = Trim(dcbcurren.BoundText) .Fields(8).Value = Trim(Text12.Text) .Fields(9).Value = Format(Trim(Mask3.Text), "dd/mm/yyyy") '+ Trim(Str(Val(Right(Trim(Mask3.Text), 4)) + 543)) .Fields(10).Value = Format(Trim(Mask4.Text), "dd/mm/yyyy") ' + Trim(Str(Val(Right(Trim(Mask4.Text), 4)) + 543)) .Fields(11).Value = Format(Trim(Mask5.Text), "dd/mm/yyyy") '+ Trim(Str(Val(Right(Trim(Mask5.Text), 4)) + 543)) If cedit = True Then .Fields(12).Value = Trim(Text13.Text) If cadd = True Then .Fields(12).Value = Trim(Text13.Text) .Fields(13).Value = Trim(dcbstatus.BoundText) .Update .Close End With Set magazinetb = Nothing End Sub Sub checkinput() If (opt1.Value = False) And (opt2.Value = False) Then MsgBox "กรุณาเลือกประเภทสิ่งพิมพ์ ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" opt1.SetFocus checkdata = False ElseIf Len(Trim(dlbtypemag.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(Text8.Text)) = 0 Then MsgBox "กรุณากรอกข้อมูลช่อง จำนวนเล่ม/Volume ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" Text8.SetFocus checkdata = False ElseIf Len(Trim(Text9.Text)) = 0 Then MsgBox "กรุณากรอกข้อมูลช่อง จำนวนVolume/ปี ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" Text9.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(dcbcurren.Text)) = 0 Then MsgBox "กรุณาเลือก สกุลเงิน ", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" dcbcurren.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(dcbbindsta.BoundText)) = 0 Then MsgBox "กรุณาเลือก สถานภาพวารสาร", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" dcbbindsta.SetFocus checkdata = False ElseIf Len(Trim(dcbbindco.BoundText)) = 0 Then MsgBox "กรุณาเลือก สีปก", vbCritical + vbOKOnly, "ข้อมูลไม่สมบรูณ์" dcbbindco.SetFocus checkdata = False End If If Len(Trim(dcbcurren.BoundText)) = 0 Then dcbcurren.BoundText = " " 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 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 'Cmdsearch.Enabled = b6 End Sub 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 End If End Sub Private Sub Cmddel_Click() If MsgBox("ต้องการลบข้อมูลหรือไม่", vbInformation + vbOKCancel, "ลบข้อมูล") = vbOK Then With typeclasstb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .LockType = adLockOptimistic .Open "select * from typeclass where pointer='" & Text1.Text & "'" If Not .EOF Then .Delete .Update End If .Close End With With magazinetb 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 With magazine1tb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .LockType = adLockOptimistic .Open "select * from magazine1 where pointer='" & Text1.Text & "'" If Not .EOF Then .Delete End If .Close End With MsgBox "ลบข้อมูลเรียบร้อแล้ว", vbInformation + vbOKOnly, "แจ้งผลการลบข้อมูล" Call cleardata Call lockinput 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 magazine1tb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select * from magazine1 where trim(Magazine1.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 magazinetb = 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 updatemagazine1 Call updatemagazine Call updatetypeclass Call resetbuttom(True, False, False, False, False, True) MsgBox "การบันทึกข้อมูลวารสารรายชื่อใหม่เรียบร้อยแล้ว", vbInformation + vbOKOnly, "ผลการบันทึกข้อมูล" Call cleardata Call lockinput End If End Sub Private Sub cleardata() cadd = False cedit = False Text1.Text = "" opt1.Value = False opt2.Value = False dlbtypemag.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text7.Text = 1 Text8.Text = 0 Text9.Text = 0 Text10.Text = "" Text11.Text = 0 Text12.Text = 0 Mask1.Text = Format(Date, "dd/mm/yyyy") '+ Trim(Str(Year(Date))) Mask2.Text = " " Mask3.Text = Format(Date, "dd/mm/yyyy") '+ Trim(Str(Year(Date))) Mask4.Text = Format(Date, "dd/mm/yyyy") '+ Trim(Str(Year(Date))) Mask5.Text = Format(Date, "dd/mm/yyyy") '+ Trim(Str(Year(Date))) dcblanguage.Text = "" dcbmagtype.Text = "" dcbdepart.Text = "" dcbrecei.Text = "" dcbcurren.Text = "" Text14.Text = "" dcbstatus.Text = "" dcbbindsta.Text = "" dcbbindco.Text = "" SSTab1.Tab = 0 End Sub Private Sub cmdsearch_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 sql1 = "select magazine1.pointer,magazine1.magazine_name,magazine1.compare_name" sql1 = sql1 & ",magazine1.old_name,magazine1.shot_name,magazine1.First_year_printed" sql1 = sql1 & ",magazine1.issn,magazine1.number_per_volume,magazine1.volume_per_year" sql1 = sql1 & ", maglang.langdesth,magtype.magtype_thai_des,dealer.Publisher_code,dealer.publisher_name " sql1 = sql1 & "from magazine1,maglang,magtype,dealer where magazine1.language_code =maglang.language_code " sql1 = sql1 & "and magazine1.magtype_code=magtype.magtype_code and magazine1.publisher_code=dealer.publisher_code " sql1 = sql1 & "and magazine1.pointer='" & Trim(Text1.Text) & "'" sql2 = "select magazine.copy_per_year,magazine.price_per_year,magazine.exchange_rate,magazine.begin_period" sql2 = sql2 & ",magazine.end_period,magazine.order_date,department.department_thai_des,receives.receivestatusdes" sql2 = sql2 & ",currmony.Currency_Thai_Des,dealer.Publisher_code,dealer.Publisher_Name,statustype.status_thai_descrition" sql2 = sql2 & ",bindtype.bindtype_des,bindcolor.bindcolor_desth from magazine,department,receives" sql2 = sql2 & ",currmony,dealer,statustype,bindtype,bindcolor where magazine.department_code=department.department_code " sql2 = sql2 & "and magazine.Receive_Code=receives.receivestatus and magazine.currency_code=currmony.currency_code " sql2 = sql2 & "and magazine.publisher_code=dealer.publisher_code and magazine.status_code=statustype.status_code " sql2 = sql2 & "and magazine.bind_type_code=bindtype.bindtype_code and magazine.bind_color_code=bindcolor.bindtype_code " sql2 = sql2 & "and magazine.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(5).Value, "dd/mm/yyyy") ' + Trim(Str(Year(.Fields(5).Value))) Mask2.Text = Format(.Fields(6).Value, "9999-9999") Text8.Text = .Fields(7).Value Text9.Text = .Fields(8).Value dcblanguage.Text = .Fields(9).Value dcbmagtype.Text = .Fields(10).Value Text6.Text = .Fields(11).Value Text10.Text = .Fields(12).Value Else MsgBox "ไม่พบข้อมูลที่ต้องการค้นหา กรุณาตรวจสอบอีกครั้ง", vbCritical + vbOKOnly, "ผลการค้นหา" Text1.Text = "" Text1.SetFocus End If End With With sqlmagazine If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open sql2 If Not .EOF Then Text7.Text = .Fields(0).Value Text11.Text = .Fields(1).Value Text12.Text = .Fields(2).Value Mask3.Text = Format(.Fields(3).Value, "dd/mm/yyyy") '+ Trim(Str(Year(.Fields(3).Value))) Mask4.Text = Format(.Fields(4).Value, "dd/mm/yyyy") '+ Trim(Str(Year(.Fields(4).Value))) Mask5.Text = Format(.Fields(5).Value, "dd/mm/yyyy") '+ Trim(Str(Year(.Fields(5).Value))) dcbdepart.Text = .Fields(6).Value dcbrecei.Text = .Fields(7).Value dcbcurren.Text = .Fields(8).Value Text13.Text = .Fields(9).Value Text14.Text = .Fields(10).Value dcbstatus.Text = .Fields(11).Value dcbbindsta.Text = .Fields(12).Value dcbbindco.Text = .Fields(13).Value Call resetbuttom(False, True, True, True, True, False) Cmdsave.Enabled = False End If End With With sqltypeclass If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select typeclass.type_code,typemag.type_thai_descrition from typeclass,typemag where typeclass.type_code=typemag.type_code and typeclass.pointer='" & Text1.Text & "'" If Not .EOF Then dlbtypemag.Text = .Fields(1).Value End With End Sub Private Sub Command6_Click() Conn.Close Set Conn = Nothing Unload Me End Sub Private Sub dcbdeler1_Click(Area As Integer) With dealer1tb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select Publisher_Code,Publisher_Name from dealer Where Publisher_Name LIKE '%" & dcbdeler1.Text & "%'" If .EOF Then namedealer = dcbdeler1.Text Adddealer.Show Else Set dcbdeler1.RowSource = dealer1tb dcbdeler1.ListField = "Publisher_Name" dcbdeler1.BoundColumn = "Publisher_Code" End If End With End Sub Private Sub dlbdeler_DblClick() Text10.Text = dlbdeler.Text Text6.Text = dlbdeler.BoundText dlbdeler.Visible = False End Sub Private Sub dlbdeler1_DblClick() Text14.Text = dlbdeler1.Text Text13.Text = dlbdeler1.BoundText dlbdeler1.Visible = False 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 sql1 = "select magazine1.pointer,magazine1.magazine_name,magazine1.compare_name" sql1 = sql1 & ",magazine1.old_name,magazine1.shot_name,magazine1.First_year_printed" sql1 = sql1 & ",magazine1.issn,magazine1.number_per_volume,magazine1.volume_per_year" sql1 = sql1 & ", maglang.langdesth,magtype.magtype_thai_des,dealer.Publisher_code,dealer.publisher_name " sql1 = sql1 & "from magazine1,maglang,magtype,dealer where magazine1.language_code =maglang.language_code " sql1 = sql1 & "and magazine1.magtype_code=magtype.magtype_code and magazine1.publisher_code=dealer.publisher_code " sql1 = sql1 & "and magazine1.pointer='" & Trim(Text1.Text) & "'" sql2 = "select magazine.copy_per_year,magazine.price_per_year,magazine.exchange_rate,magazine.begin_period" sql2 = sql2 & ",magazine.end_period,magazine.order_date,department.department_thai_des,receives.receivestatusdes" sql2 = sql2 & ",currmony.Currency_Thai_Des,dealer.Publisher_code,dealer.Publisher_Name,statustype.status_thai_descrition" sql2 = sql2 & ",bindtype.bindtype_des,bindcolor.bindcolor_desth from magazine,department,receives" sql2 = sql2 & ",currmony,dealer,statustype,bindtype,bindcolor where magazine.department_code=department.department_code " sql2 = sql2 & "and magazine.Receive_Code=receives.receivestatus and magazine.currency_code=currmony.currency_code " sql2 = sql2 & "and magazine.publisher_code=dealer.publisher_code and magazine.status_code=statustype.status_code " sql2 = sql2 & "and magazine.bind_type_code=bindtype.bindtype_code and magazine.bind_color_code=bindcolor.bindtype_code " sql2 = sql2 & "and magazine.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(5).Value, "dd/mm/yyyy") ' + Trim(Str(Year(.Fields(5).Value))) Mask2.Text = Format(.Fields(6).Value, "9999-9999") Text8.Text = .Fields(7).Value Text9.Text = .Fields(8).Value dcblanguage.Text = .Fields(9).Value dcbmagtype.Text = .Fields(10).Value Text6.Text = .Fields(11).Value Text10.Text = .Fields(12).Value With sqlmagazine If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open sql2 If Not .EOF Then Text7.Text = .Fields(0).Value Text11.Text = .Fields(1).Value Text12.Text = .Fields(2).Value Mask3.Text = Format(.Fields(3).Value, "dd/mm/yyyy") '+ Trim(Str(Year(.Fields(3).Value))) Mask4.Text = Format(.Fields(4).Value, "dd/mm/yyyy") '+ Trim(Str(Year(.Fields(4).Value))) Mask5.Text = Format(.Fields(5).Value, "dd/mm/yyyy") '+ Trim(Str(Year(.Fields(5).Value))) dcbdepart.Text = .Fields(6).Value dcbrecei.Text = .Fields(7).Value dcbcurren.Text = .Fields(8).Value Text13.Text = .Fields(9).Value Text14.Text = .Fields(10).Value dcbstatus.Text = .Fields(11).Value dcbbindsta.Text = .Fields(12).Value dcbbindco.Text = .Fields(13).Value End If End With With sqltypeclass If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select typeclass.type_code,typemag.type_thai_descrition from typeclass,typemag where typeclass.type_code=typemag.type_code and typeclass.pointer='" & Text1.Text & "'" If Not .EOF Then dlbtypemag.Text = .Fields(1).Value End With Call resetbuttom(False, True, True, False, True, False) Else MsgBox "ไม่พบข้อมูลที่ต้องการค้นหา กรุณาตรวจสอบอีกครั้ง", vbCritical + vbOKOnly, "ผลการค้นหา" Text1.Text = "" Text1.SetFocus End If End With End Sub Private Sub Form_Load() Call cleardata Call lockinput With Conn If .State = adStateOpen Then .Close .ConnectionString = StrConn & ";Data Source=F:\LIBRARY\DATABASE\Magazine.mdb" .CommandTimeout = 90 .Open End With With typemagtb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select * from typemag" End With Set dlbtypemag.RowSource = typemagtb dlbtypemag.ListField = "Type_Thai_Descrition" dlbtypemag.BoundColumn = "Type_Code" With magtypetb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select * from magtype" End With Set dcbmagtype.RowSource = magtypetb dcbmagtype.ListField = "MagType_Thai_Des" dcbmagtype.BoundColumn = "MagType_Code" With maglangtb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select * from maglang" End With Set dcblanguage.RowSource = maglangtb dcblanguage.ListField = "LangDesTh" dcblanguage.BoundColumn = "Language_Code" With departtb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select * from department" End With Set dcbdepart.RowSource = departtb dcbdepart.ListField = "Department_Thai_Des" dcbdepart.BoundColumn = "Department_Code" With receitb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select * from receives" End With Set dcbrecei.RowSource = receitb dcbrecei.ListField = "receivestatusdes" dcbrecei.BoundColumn = "receivestatus" With curretb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select * from currmony" End With Set dcbcurren.RowSource = curretb dcbcurren.ListField = "Currency_Thai_Des" dcbcurren.BoundColumn = "Currency_Code" With statustb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select * from statustype" End With Set dcbstatus.RowSource = statustb dcbstatus.ListField = "Status_Thai_Descrition" dcbstatus.BoundColumn = "status_Code" With bindcotb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select * from bindcolor" End With Set dcbbindco.RowSource = bindcotb dcbbindco.ListField = "BindColor_DesTh" dcbbindco.BoundColumn = "BindType_Code" With bindstatb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select * from bindtype" End With Set dcbbindsta.RowSource = bindstatb dcbbindsta.ListField = "BindType_Des" dcbbindsta.BoundColumn = "BindType_Code" End Sub Private Sub Mask1_Change() If Len(Trim(Mask1)) = 10 Then Call checkdate(Mask1) If checkd = 1 Then MsgBox "พิมพ์ข้อมูลวันที่ผิดพลาด ใช้รูปแบบ DD/MM/YYYY", vbCritical + vbOKOnly, "รูปแบบข้อมูลผิดพลาด" Call Mask1_Click End If End If End Sub Private Sub Mask1_Click() Mask1.SelStart = 0 Mask1.SelLength = 10 End Sub Private Sub Mask1_KeyPress(KeyAscii As Integer) Dim character As String character = "0123456789" KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If Len(Trim(Mask1)) = 2 Or Len(Trim(Mask1)) = 5 Then Mask1.Text = Mask1.Text + "/" Mask1.SelStart = Len(Trim(Mask1.Text)) Else If InStr(character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End If End Sub Private Sub Mask2_Click() Mask2.SelStart = 0 Mask2.SelLength = Len(Trim(Mask2)) End Sub Private Sub Mask2_KeyPress(KeyAscii As Integer) Dim character As String character = "0123456789" KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If Len(Trim(Mask2)) = 4 Then Mask2.Text = Trim(Mask2.Text) + "-" Mask2.SelStart = Len(Trim(Mask2.Text)) Else If InStr(character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End If End Sub Private Sub Mask3_Change() If Len(Trim(Mask3)) = 10 Then Call checkdate(Mask3) If checkd = 1 Then MsgBox "พิมพ์ข้อมูลวันที่ผิดพลาด ใช้รูปแบบ DD/MM/YYYY", vbCritical + vbOKOnly, "รูปแบบข้อมูลผิดพลาด" Call Mask3_Click End If End If End Sub Private Sub Mask3_Click() Mask3.SelStart = 0 Mask3.SelLength = Len(Trim(Mask3)) End Sub Private Sub Mask3_KeyPress(KeyAscii As Integer) Dim character As String character = "0123456789" KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If Len(Trim(Mask3)) = 2 Or Len(Trim(Mask3)) = 5 Then Mask3.Text = Mask3.Text + "/" Mask3.SelStart = Len(Trim(Mask3.Text)) Else If InStr(character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End If End Sub Private Sub Mask4_Change() If Len(Trim(Mask4)) = 10 Then Call checkdate(Mask4) If checkd = 1 Then MsgBox "พิมพ์ข้อมูลวันที่ผิดพลาด ใช้รูปแบบ DD/MM/YYYY", vbCritical + vbOKOnly, "รูปแบบข้อมูลผิดพลาด" Call Mask4_Click End If End If End Sub Private Sub Mask4_Click() Mask4.SelStart = 0 Mask4.SelLength = Len(Trim(Mask4)) End Sub Private Sub Mask4_KeyPress(KeyAscii As Integer) Dim character As String character = "0123456789" KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If Len(Trim(Mask4)) = 2 Or Len(Trim(Mask4)) = 5 Then Mask4.Text = Mask4.Text + "/" Mask4.SelStart = Len(Trim(Mask4.Text)) Else If InStr(character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End If End Sub Private Sub Mask5_Change() If Len(Trim(Mask5)) = 10 Then Call checkdate(Mask5) If checkd = 1 Then MsgBox "พิมพ์ข้อมูลวันที่ผิดพลาด ใช้รูปแบบ DD/MM/YYYY", vbCritical + vbOKOnly, "รูปแบบข้อมูลผิดพลาด" Call Mask5_Click End If End If End Sub Private Sub Mask5_Click() Mask5.SelStart = 0 Mask5.SelLength = Len(Trim(Mask5)) End Sub Private Sub Mask5_KeyPress(KeyAscii As Integer) Dim character As String character = "0123456789" KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If Len(Trim(Mask5)) = 2 Or Len(Trim(Mask5)) = 5 Then Mask5.Text = Mask5.Text + "/" Mask5.SelStart = Len(Trim(Mask5.Text)) Else If InStr(character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End If End Sub Private Sub Text10_DblClick() With dealertb If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient '.Open "select * from dealer Where Publisher_Name LIKE '%" & Text10.Text & "%'" .Open "select Publisher_Code,Publisher_Name from dealer Where Publisher_Name LIKE '%" & Text10.Text & "%'" If .EOF Then namedealer = Text10.Text Adddealer.Show Else dlbdeler.Visible = True Set dlbdeler.RowSource = dealertb dlbdeler.ListField = "Publisher_Name" dlbdeler.BoundColumn = "Publisher_Code" End If End With End Sub Private Sub Text11_Click() Text11.SelStart = 0 Text11.SelLength = Len(Trim(Text11)) End Sub Private Sub Text11_KeyPress(KeyAscii As Integer) Dim character As String character = "0123456789" KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End Sub Private Sub Text12_Click() Text12.SelStart = 0 Text12.SelLength = Len(Trim(Text12)) End Sub Private Sub Text12_KeyPress(KeyAscii As Integer) Dim character As String character = "0123456789" KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End Sub Private Sub Text14_DblClick() With dealer1tb 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 .EOF Then namedealer = Trim(Text14.Text) Adddealer.Show Else dlbdeler1.Visible = True Set dlbdeler1.RowSource = dealer1tb dlbdeler1.ListField = "Publisher_Name" dlbdeler1.BoundColumn = "Publisher_Code" End If End With End Sub Private Sub Text2_DblClick() dlbnamemag.Visible = True With magazinelist If .State = adStateOpen Then .Close .ActiveConnection = Conn .CursorType = adOpenForwardOnly .CursorLocation = adUseClient .Open "select pointer,Magazine_Name from magazine1 Where Magazine_Name LIKE '%" & Text2.Text & "%'" End With Set dlbnamemag.RowSource = magazinelist dlbnamemag.ListField = "Magazine_name" dlbnamemag.BoundColumn = "Pointer" End Sub Private Sub Text7_Click() Text7.SelStart = 0 Text7.SelLength = Len(Trim(Text7)) End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) Dim character As String character = "0123456789" KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If If KeyAscii = 13 Then SendKeys "{Tab}" KeyAscii = 0 End If End Sub Private Sub Text8_Click() Text8.SelStart = 0 Text8.SelLength = Len(Trim(Text8)) End Sub Private Sub Text8_KeyPress(KeyAscii As Integer) Dim character As String character = "0123456789" KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End Sub Private Sub Text9_Click() Text9.SelStart = 0 Text9.SelLength = Len(Trim(Text9)) End Sub Private Sub Text9_KeyPress(KeyAscii As Integer) Dim character As String character = "0123456789" KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End Sub Sub lockinput() Text1.Enabled = True Text1.BackColor = &HFFFFFF opt1.Enabled = False opt2.Enabled = False dlbtypemag.Enabled = False Text3.Enabled = False Text3.BackColor = &HC0C0C0 Text4.Enabled = False Text4.BackColor = &HC0C0C0 Text5.Enabled = False Text5.BackColor = &HC0C0C0 Text8.Enabled = False Text8.BackColor = &HC0C0C0 Text9.Enabled = False Text9.BackColor = &HC0C0C0 Text10.Enabled = False Text10.BackColor = &HC0C0C0 Text7.Enabled = False Text7.BackColor = &HC0C0C0 Text11.Enabled = False Text11.BackColor = &HC0C0C0 Text12.Enabled = False Text12.BackColor = &HC0C0C0 Mask1.Enabled = False Mask1.BackColor = &HC0C0C0 Mask2.Enabled = False Mask2.BackColor = &HC0C0C0 Mask3.Enabled = False Mask3.BackColor = &HC0C0C0 Mask4.Enabled = False Mask4.BackColor = &HC0C0C0 Mask5.Enabled = False Mask5.BackColor = &HC0C0C0 dcblanguage.Enabled = False dcblanguage.BackColor = &HC0C0C0 dcbmagtype.Enabled = False dcbmagtype.BackColor = &HC0C0C0 dcbdepart.Enabled = False dcbdepart.BackColor = &HC0C0C0 dcbrecei.Enabled = False dcbrecei.BackColor = &HC0C0C0 dcbcurren.Enabled = False dcbcurren.BackColor = &HC0C0C0 Text14.Enabled = False Text14.BackColor = &HC0C0C0 dcbstatus.Enabled = False dcbstatus.BackColor = &HC0C0C0 dcbbindsta.Enabled = False dcbbindsta.BackColor = &HC0C0C0 dcbbindco.Enabled = False dcbbindco.BackColor = &HC0C0C0 End Sub Sub unlockinput() Text1.Enabled = False Text1.BackColor = &HC0C0C0 opt1.Enabled = True opt2.Enabled = True dlbtypemag.Enabled = True Text3.Enabled = True Text3.BackColor = &HFFFFFF Text4.Enabled = True Text4.BackColor = &HFFFFFF Text5.Enabled = True Text5.BackColor = &HFFFFFF Text8.Enabled = True Text8.BackColor = &HFFFFFF Text9.Enabled = True Text9.BackColor = &HFFFFFF Text10.Enabled = True Text10.BackColor = &HFFFFFF Text7.Enabled = True Text7.BackColor = &HFFFFFF Text11.Enabled = True Text11.BackColor = &HFFFFFF Text12.Enabled = True Text12.BackColor = &HFFFFFF Mask1.Enabled = True Mask1.BackColor = &HFFFFFF Mask2.Enabled = True Mask2.BackColor = &HFFFFFF Mask3.Enabled = True Mask3.BackColor = &HFFFFFF Mask4.Enabled = True Mask4.BackColor = &HFFFFFF Mask5.Enabled = True Mask5.BackColor = &HFFFFFF dcblanguage.Enabled = True dcblanguage.BackColor = &HFFFFFF dcbmagtype.Enabled = True dcbmagtype.BackColor = &HFFFFFF dcbdepart.Enabled = True dcbdepart.BackColor = &HFFFFFF dcbrecei.Enabled = True dcbrecei.BackColor = &HFFFFFF dcbcurren.Enabled = True dcbcurren.BackColor = &HFFFFFF Text14.Enabled = True Text14.BackColor = &HFFFFFF dcbstatus.Enabled = True dcbstatus.BackColor = &HFFFFFF dcbbindsta.Enabled = True dcbbindsta.BackColor = &HFFFFFF dcbbindco.Enabled = True dcbbindco.BackColor = &HFFFFFF End Sub