?? main.frm
字號:
VERSION 5.00
Begin VB.Form main
Caption = "Form1"
ClientHeight = 6285
ClientLeft = 165
ClientTop = 855
ClientWidth = 8715
LinkTopic = "Form1"
ScaleHeight = 6285
ScaleWidth = 8715
StartUpPosition = 3 '窗口缺省
Begin VB.Menu jbxxwh
Caption = "基本信息維護"
Begin VB.Menu wtdwwh
Caption = "委托單位維護"
End
Begin VB.Menu yqmcwh
Caption = "儀器名稱維護"
End
Begin VB.Menu yqxhwh
Caption = "儀器型號維護"
End
Begin VB.Menu zzcx
Caption = "制造廠"
End
Begin VB.Menu jdyjwh
Caption = "檢定依據維護"
End
Begin VB.Menu jdqj
Caption = "檢定器具維護"
End
Begin VB.Menu jdqjxh
Caption = "檢定器具型號"
End
Begin VB.Menu bqdd
Caption = "不確定度或準確度"
End
Begin VB.Menu jdzsmc
Caption = "檢定證書號"
End
Begin VB.Menu wdwh
Caption = "溫度"
End
Begin VB.Menu sdwh
Caption = "濕度"
End
Begin VB.Menu jdjg
Caption = "檢定結果"
End
Begin VB.Menu jdjgsj
Caption = "檢定結果數據"
End
End
Begin VB.Menu zssjwh
Caption = "證書數據維護"
Begin VB.Menu lrzs
Caption = "錄入證書"
End
Begin VB.Menu xgzs
Caption = "修改證書"
End
Begin VB.Menu sczs
Caption = "刪除證書"
End
End
Begin VB.Menu cxdyzs
Caption = "查詢打印證書"
Begin VB.Menu abh
Caption = "按證書編號"
End
Begin VB.Menu awtdw
Caption = "按委托單位"
End
Begin VB.Menu ayqmc
Caption = "按儀器名稱"
End
Begin VB.Menu mhcxm
Caption = "模糊查詢"
End
End
Begin VB.Menu tuc
Caption = "退出"
End
End
Attribute VB_Name = "main"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Type rect
left As Long
top As Long
right As Long
botton As Long
End Type
Dim desktoparea As rect
Private Const SPI_GETWORKAREA = 48
Dim screenwidth&, screenheight&, screenleft&, screentop&
Private Sub abh_Click()
caxiun = 1
abhc.Show 1
End Sub
Private Sub awtdw_Click()
caxiun = 2
abhc.Show 1
End Sub
Private Sub axh_Click()
End Sub
Private Sub ayqmc_Click()
caxiun = 3
abhc.Show 1
End Sub
Private Sub bqdd_Click()
flag = 7
jbxx.Show 1
End Sub
Private Sub Form_Load()
On Error GoTo err1
xtm = "林甸縣質量技術監督局"
Me.Caption = xtm
Call SystemParametersInfo(SPI_GETWORKAREA, 0, desktoparea, 0)
screenwidth = (desktoparea.right - desktoparea.left) * Screen.TwipsPerPixelX
screenheight = (desktoparea.botton - desktoparea.top) * Screen.TwipsPerPixelY
main.Width = screenwidth
main.Height = screenheight
main.Move 0, 0
conns = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\bak.mdb"
Set conn = New ADODB.Connection
conn.Open conns
Set grs = New ADODB.Recordset
bm(0) = "證書編號"
bm(1) = "委托單位"
bm(2) = "儀器名稱"
bm(3) = "型號規格"
bm(4) = "制造廠"
bm(5) = "出廠編號"
bm(6) = "檢定結論"
bm(7) = "室主任"
bm(8) = "檢驗員"
bm(9) = "檢定員"
bm(10) = "檢定日期"
bm(11) = "有效期至"
bm(12) = "1.本次檢定技術依據"
bm(13) = "溫度"
bm(14) = "濕度"
bm(15) = "檢定結果"
bmm(0) = "名 稱"
bmm(1) = "型號/規格"
bmm(2) = "不確定度"
bmm(3) = "檢定證書號"
btt(0) = 20
btt(1) = 20
btt(2) = 20
btt(3) = 20
err1:
If err.Number = -2147467259 Then
creatdb App.Path
CreateTable App.Path
Resume
End If
End Sub
Public Sub creatdb(dirr As String)
'On Error GoTo errorhander
Dim cat As New ADOX.Catalog
cat.Create conns
Set cat = Nothing
'errorhander:
End Sub
Sub CreateTable(dirr As String)
' On Error GoTo err
Dim con As New ADODB.Connection
'字典表************************************
sql1 = "create table wtdwb(sy integer not null unique,wtdwmc text(20))"
sql2 = "create table yqmcb(sy integer not null,yqflm integer , yqmc text(20) not null)"
sql3 = "create table xhggb(sy integer not null ,yqxhm integer ,xhmc text(20) not null)"
sql4 = "create table jdyjb(sy integer not null,yjmc text(30))"
sql5 = "create table jdqjmcb(sy integer not null,yqflm integer unique,yqmc text(20))"
sql6 = "create table jdqjxhb(sy integer not null ,yqflm integer,yqxh text(20))"
sql7 = "create table zqdb(sy integer not null ,zqdmc text(20))"
sql8 = "create table jdjgmcb(sy integer not null,jdjgmc text(20))"
sql9 = "create table jdjgsjb(sy integer not null,jdjgsj text(10))"
sql10 = "create table zzcb(sy integer not null,zzc text(30))"
'*******************************************
sql11 = "create table jdzsb(zsbh text(9) not null unique,wtdwmc text(30),yqmc text(30), yqgg text(30),zzc text(30),ccbh text(20),jdjl text(4),szr text(4),jyy text(4),jdy text(4), jdrq text(10),yxqz text(10),jdyq text(40),wd text(10), sd text(10))"
sql12 = "create table zyjlqjb(zsbh text(9) not null,qjmc text(20) not null,qjxh text(20),zqdmc text(20), jdzsh text(20))"
sql13 = "create table jdjgb (zsbh text(9) not null,jdjg text(200))"
'***************************************************
sql14 = "create table dyjwz(dyjm text(20) not null unique," '打印機位置表
For i = 0 To 80
sql14 = sql14 + "wz" + Trim(str(i)) & " Single,"
Next i
sql14 = Mid(sql14, 1, Len(sql14) - 1) + ")"
sql15 = "create table wdb(sy integer not null,flbz integer,wd text(10))" '溫度表
sql16 = "create table sdb(sy integer not null,flbz integer,sd text(10))" '濕度表
sql17 = "create table qjjdzsb(sy integer not null,flbz integer,jdzs text(20))" '檢定器具編號表
Set con = New ADODB.Connection
con.Open conns
con.Execute sql1
con.Execute sql2
con.Execute sql3
con.Execute sql4
con.Execute sql5
con.Execute sql6
con.Execute sql7
con.Execute sql8
con.Execute sql9
con.Execute sql10
Debug.Print sql11
con.Execute sql11
con.Execute sql12
con.Execute sql13
con.Execute sql14
con.Execute sql15
con.Execute sql16
con.Execute sql17
con.Close
Set con = Nothing
err:
Set con = Nothing
End Sub
Private Sub jdjg_Click()
flag = 8
jbxx.Show 1
End Sub
Private Sub jdjgsj_Click()
flag = 9
jbxx.Show 1
End Sub
Private Sub jdqj_Click()
flag = 5
jbxx.Show 1
End Sub
Private Sub jdqjxh_Click()
flag = 6
jbxx.Show 1
End Sub
Private Sub jdyjwh_Click()
flag = 4
jbxx.Show 1
End Sub
Private Sub jdzsmc_Click()
flag = 88
jbxx.Show 1
End Sub
Private Sub lrzs_Click()
sjlr.Show 1
End Sub
Private Sub mhcx_Click()
End Sub
Private Sub mhcxm_Click()
mhcx.Show 1
End Sub
Private Sub sczs_Click()
jdzsb.Show 1
End Sub
Private Sub sdwh_Click()
flag = 100
jbxx.Show 1
End Sub
Private Sub tuc_Click()
End
End Sub
Private Sub wdwh_Click()
flag = 99
jbxx.Show 1
End Sub
Private Sub wtdwwh_Click()
flag = 1
jbxx.Show 1
End Sub
Private Sub xgzs_Click()
jdzsb.Show 1
End Sub
Private Sub yqmcwh_Click()
flag = 2
jbxx.Show 1
End Sub
Private Sub yqxhwh_Click()
flag = 3
jbxx.Show 1
End Sub
Private Sub zzcx_Click()
flag = 10
jbxx.Show 1
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -