Private Sub Command5_Click()
DoCmd.RunSQL "UPDATE 车号 SET 车号.是否已空 =no WHERE 车号.编号=5"
Forms!开单!车号 = "5"
DoCmd.Close
End Sub
Private Sub Command6_Click()
DoCmd.RunSQL "UPDATE 车号 SET 车号.是否已空 =no WHERE 车号.编号=6"
Forms!开单!车号 = "6"
DoCmd.Close
End Sub
Private Sub Command7_Click()
DoCmd.RunSQL "UPDATE 车号 SET 车号.是否已空 =no WHERE 车号.编号=7"
Forms!开单!车号 = "7"
DoCmd.Close
End Sub
Private Sub Command8_Click()
DoCmd.RunSQL "UPDATE 车号 SET 车号.是否已空 =no WHERE 车号.编号=8"
Forms!开单!车号 = "8"
DoCmd.Close
End Sub
Private Sub Command9_Click()
DoCmd.RunSQL "UPDATE 车号 SET 车号.是否已空 =no WHERE 车号.编号=9"
Forms!开单!车号 = "9"
DoCmd.Close
End Sub
Private Sub Command10_Click()
DoCmd.RunSQL "UPDATE 车号 SET 车号.是否已空 =no WHERE 车号.编号=10"
Forms!开单!车号 = "14"
DoCmd.Close
End Sub
Private Sub Form_Load()
Me.KeyPreview = True
If DLookup("是否已空", "车号", "编号=1") = 0 Then
Me.Command1.Enabled = False
End If
If DLookup("是否已空", "车号", "编号=2") = 0 Then
Me.Command2.Enabled = False
End If
If DLookup("是否已空", "车号", "编号=3") = 0 Then
Me.Command3.Enabled = False
End If
If DLookup("是否已空", "车号", "编号=4") = 0 Then
Me.Command4.Enabled = False
End If
If DLookup("是否已空", "车号", "编号=5") = 0 Then
Me.Command5.Enabled = False
End If
If DLookup("是否已空", "车号", "编号=6") = 0 Then
Me.Command6.Enabled = False
End If
end sub
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) | Powered by Discuz! X3.3 |