Option Compare Database

Private Sub Form_Current()
    DoCmd.Maximize
End Sub
Private Sub Command11_Click()
Dim strWhere As String
    strWhere = "拼音 Like '*" & Me.Text6 & "*'"
    Me.S窗体.Form.Filter = strWhere
    Me.S窗体.Form.FilterOn = True
End Sub

Private Sub Command130_Click()
Dim strWhere As String
    strWhere = "五笔 Like '*" & Me.Text162 & "*'"
    Me.S窗体.Form.Filter = strWhere
    Me.S窗体.Form.FilterOn = True
End Sub

Private Sub Fdelall_Click()
     SQLSTR = "delete * from grade"
     DoCmd.SetWarnings False              ' 取消系统提示
    DoCmd.RunSQL SQLSTR            ' 运行查询
    DoCmd.SetWarnings True                ' 恢复系统提示
    Me.F窗体.Form.Requery
End Sub

 

 

Option Compare Database

Private Sub S序号_DblClick(Cancel As Integer)
  Call llx
End Sub


Private Sub S项目编码_DblClick(Cancel As Integer)
  Call llx
End Sub

Private Sub S项目名称_DblClick(Cancel As Integer)
  Call llx
End Sub

Private Sub S剂型_DblClick(Cancel As Integer)
  Call llx
End Sub
Private Sub S规格_DblClick(Cancel As Integer)
  Call llx
End Sub

Private Sub S厂家_DblClick(Cancel As Integer)
  Call llx
End Sub

Sub llx()
    SQLSTR = "insert into grade(项目编号, 项目名称,剂型, 厂家, 规格) SELECT  项目编号, 项目名称,剂型, 厂家, 规格 FROM ypk WHERE 序号 = " & Me.序号 & ""


    DoCmd.SetWarnings False              ' 取消系统提示
    DoCmd.RunSQL SQLSTR            ' 运行查询
    DoCmd.SetWarnings True                ' 恢复系统提示

    Me.Parent.F窗体.Form.Requery
End Sub


 

 

Option Compare Database

Private Sub F项目编号_DblClick(Cancel As Integer)
 Call Fdelone
End Sub

Private Sub F项目名称_DblClick(Cancel As Integer)
 Call Fdelone
End Sub

Private Sub F厂家_DblClick(Cancel As Integer)
   Call Fdelone
End Sub

Private Sub F规格_DblClick(Cancel As Integer)
 Call Fdelone
End Sub
Private Sub F剂型_DblClick(Cancel As Integer)
 Call Fdelone
End Sub

Sub Fdelone()
     SQLSTR = "delete * from grade WHERE  序号  = " & Me.序号 & ""
     DoCmd.SetWarnings False              ' 取消系统提示
    DoCmd.RunSQL SQLSTR            ' 运行查询
    DoCmd.SetWarnings True                ' 恢复系统提示
    Me.Form.Requery
End Sub

 

摘录
计算机