📄 frmprintrest.frm
字号:
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Signature"
Height = 375
Index = 6
Left = 5760
TabIndex = 20
Top = 5880
Width = 975
End
Begin VB.Line Line4
X1 = 5280
X2 = 7320
Y1 = 6600
Y2 = 6600
End
Begin VB.Line Line3
X1 = 6000
X2 = 6000
Y1 = 2880
Y2 = 2520
End
Begin VB.Line Line2
X1 = 4680
X2 = 4680
Y1 = 2880
Y2 = 2520
End
Begin VB.Line Line1
X1 = 840
X2 = 840
Y1 = 2880
Y2 = 2520
End
Begin VB.Label Label2
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = " Sl. Items Rste Amount"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 375
Left = 360
TabIndex = 16
Top = 2520
Width = 7215
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Date."
Height = 255
Index = 5
Left = 3600
TabIndex = 11
Top = 840
Visible = 0 'False
Width = 495
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Bill No."
Height = 375
Index = 4
Left = 360
TabIndex = 9
Top = 840
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Address"
Height = 375
Index = 3
Left = 360
TabIndex = 8
Top = 1800
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Customer Name"
Height = 375
Index = 2
Left = 2640
TabIndex = 7
Top = 1320
Width = 1455
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Cash/Memo"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 1
Left = 2880
TabIndex = 6
Top = 240
Width = 1815
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Customer No."
Height = 375
Index = 0
Left = 360
TabIndex = 5
Top = 1320
Width = 1095
End
End
Attribute VB_Name = "FrmPrintRest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim MyDb As Database, MyRs As Recordset
Private Sub Command1_Click()
Me.BackColor = vbWhite
SQL = "select * from RESTO where BILLNO='" & Text4.Text & "'"
Set MyDb = DBEngine.Workspaces(0).OpenDatabase("D:\HOTEL\RESTO\RESTO.MDB")
Set MyRs = MyDb.OpenRecordset(SQL, dbOpenDynaset)
Do While Not MyRs.EOF
MyRs.Edit
MyRs!PRINT = "DONE"
MyRs.Update
MyRs.MoveNext
Loop
MyDb.Close
Command1.Visible = False
Command2.Visible = False
Command3.Visible = False
Me.Width = 8055
FrmPrintRest.PrintForm
Command1.Visible = True
Command2.Visible = True
Command3.Visible = True
Me.Width = 11865
Me.BackColor = &HC0E0FF
Form_Load
Command1.Default = False
Command1.Enabled = False
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
BILLENTRY
End Sub
Private Sub Form_Load()
On Error Resume Next
Me.Left = MDIForm1.Left + 1000
Me.Top = MDIForm1.Top + 1000
List5.Clear
List6.Clear
SQL = "select * from RESTO where PRINT='" & "NOTDONE" & "'"
Set MyDb = DBEngine.Workspaces(0).OpenDatabase("D:\HOTEL\RESTO\RESTO.MDB")
Set MyRs = MyDb.OpenRecordset(SQL, dbOpenDynaset)
Do While Not MyRs.EOF
List5.AddItem MyRs!BILLNO
MyRs.MoveNext
Loop
SQL2 = "select * from RESTO where PRINT='" & "DONE" & "'"
Set MyRs = MyDb.OpenRecordset(SQL2, dbOpenDynaset)
Do While Not MyRs.EOF
List6.AddItem MyRs!BILLNO
MyRs.MoveNext
Loop
MyDb.Close
End Sub
Private Sub BILLENTRY()
List1.Clear
List2.Clear
List3.Clear
List4.Clear
Text1 = ""
Text2 = ""
Text3 = ""
Text7 = ""
Dim Amt, SL
SL = 0
On Error Resume Next
SQL = "select * from RESTO where BILLNO='" & Text4.Text & "'"
Set MyDb = DBEngine.Workspaces(0).OpenDatabase("D:\HOTEL\RESTO\RESTO.MDB")
Set MyRs = MyDb.OpenRecordset(SQL, dbOpenDynaset)
Do While Not MyRs.EOF
Text1.Text = MyRs!CUSTOMERNO
Text2.Text = MyRs!CUSTOMERNAME
Text3.Text = MyRs!ADDRESS
SL = SL + 1
List1.AddItem SL
List2.AddItem MyRs!ITEMNAME
List3.AddItem MyRs!Rate & "/="
Amt = MyRs!AM0UNT
List4.AddItem Amt & "/="
Text7.Text = Val(Text7.Text) + Amt & "/="
MyRs.MoveNext
Loop
MyDb.Close
End Sub
Private Sub List5_Click()
Command1.Enabled = True
Text4.Text = List5.Text
BILLENTRY
Command1.Default = True
End Sub
Private Sub List6_Click()
Command1.Enabled = True
Text4.Text = List6.Text
BILLENTRY
Command1.Default = True
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
List5.Enabled = True
List6.Enabled = False
List1.Clear
List2.Clear
List3.Clear
List4.Clear
Text1 = ""
Text2 = ""
Text3 = ""
Text7 = ""
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
List6.Enabled = True
List5.Enabled = False
End If
End Sub
Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
BILLENTRY
Command1.Default = True
End If
End Sub
Private Sub Timer1_Timer()
Text5.Text = "Date: " & Format(Now, "DD-MMMM=YYYY") & " Time: " & Format(Now, "HH:MM AM/PM")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -