论文首页哲学论文经济论文法学论文教育论文文学论文历史论文理学论文工学论文医学论文管理论文艺术论文 |
Private Sub txtUserName_KeyPress(Index As Integer, KeyAscii As Integer)
If Index = 9 Then
If KeyAscii <> 8 And KeyAscii <> 46 And KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0
End If
End Sub
数据导入界面设计:
数据导入代码设计:
Private Sub Command1_Click()
On Error GoTo errhandle:
Dim a As String
a = App.Path
a = a & "\"
b = Text1.Text
Dim filename As String
If Dir("" & a & "计费系统数据库.mdb") <> "" Then
Dim ll As String
ll = MsgBox("此目录下有此文件要覆盖吗", vbYesNo, "复制文件")
If ll = vbYes Then
Private Sub Command2_Click()
dy
Unload Me
End Sub
Private Sub Dir1_Change()
If Right(Dir1.Path, 1) <> "\" Then
Text1.Text = Dir1.Path + "\"
Else
Text1.Text = Dir1.Path
End If
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
If Drive1.Drive = "a:" Then
MsgBox "不能从A盘导入"
Exit Sub
End If
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
Text1.Text = Text1.Text + File1.filename
Command1.Enabled = True
End Sub
Private Sub Form_Activate()
gCnn.Close
Command1.Enabled = False
'Text1.Text = "c:\"
Text1.Text = CurDir()
Text1.Enabled = False
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
dy
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
If gCnn.State = 0 Then
gCnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:database password= " & DbPassword & " ;Data Source= " & _
App.Path & "\data\dbdb.mdb;Persist Security Info=False"
gCnn.CursorLocation = adUseClient
gCnn.Open
End If
MDIme.loadAdd
End Sub
数据删除界面设计:
数据删除代码设计:
Private Sub cmdAsure_Cl