|
Private Sub Command5_Click()
cmdCommon 5
'cmdCommon replace(Me.ActiveControl.Name,"Command") //also available - ACMAIN
End Sub
Private Sub Command6_Click()
cmdCommon 6
End Sub
Private Sub Command7_Click()
cmdCommon 7
End Sub
Private Sub Command8_Click()
cmdCommon 8
End Sub
Private Sub Command9_Click()
cmdCommon 9
End Sub
Private Sub Command10_Click()
cmdCommon 10
End Sub
Private Sub cmdCommon(iNum as integer)
DoCmd.RunSQL "UPDATE 车号 SET 是否已空 =no WHERE 编号=" & iNum
Forms!开单!车号 = iNum
DoCmd.Close
end sub
Private Sub Form_Load()
Me.KeyPreview = True
Me.Command1.Enabled = not isnull(DLookup("是否已空", "车号", "编号=1"))
Me.Command2.Enabled = not isnull(DLookup("是否已空", "车号", "编号=2"))
Me.Command3.Enabled = not isnull(DLookup("是否已空", "车号", "编号=3"))
Me.Command4.Enabled = not isnull(DLookup("是否已空", "车号", "编号=4"))
Me.Command5.Enabled = not isnull(DLookup("是否已空", "车号", "编号=5"))
Me.Command6.Enabled = not isnull(DLookup("是否已空", "车号", "编号=6"))
end sub
******************
* 一切皆有可能 *
******************
.
ACMAIN - Access论坛回贴准则(个人).
.
同一贴子不回复第二次
.
QQ群 48866293 / 12035577 / 7440532 / 13666209
http://www.accessbbs.cn/bbs/index.php .
http://www.accessoft.com/bbs/index.asp .
http://www.access-programmers.co.uk/forums .
http://www.office-cn.net .
.
http://www.office-cn.net/home/space.php?uid=141646 . |
|