📄 frmprint.frm
字号:
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = " Customer No"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 375
Left = 360
TabIndex = 22
Top = 480
Width = 1455
End
Begin VB.Label Label8
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = " Check Out Date"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 375
Left = 7320
TabIndex = 20
Top = 1440
Width = 1575
End
Begin VB.Label Label7
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = " Check In Date"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 375
Left = 7320
TabIndex = 18
Top = 960
Width = 1575
End
Begin VB.Label Label6
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Cash/Memo"
BeginProperty Font
Name = "MS Sans Serif"
Size = 13.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3960
TabIndex = 13
Top = 0
Width = 1935
End
Begin VB.Line Line3
X1 = 9000
X2 = 9000
Y1 = 2760
Y2 = 2400
End
Begin VB.Line Line2
X1 = 7920
X2 = 7920
Y1 = 2760
Y2 = 2400
End
Begin VB.Line Line1
X1 = 840
X2 = 840
Y1 = 2760
Y2 = 2400
End
Begin VB.Label Label5
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Caption = " Sl. Items Rate 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 = 8
Top = 2400
Width = 10215
End
Begin VB.Label Label4
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "This is Computer generated bill. Signature"
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 = 495
Left = 360
TabIndex = 7
Top = 6360
Width = 10215
End
Begin VB.Label Label3
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = " Total Days:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 375
Left = 7320
TabIndex = 5
Top = 1920
Width = 1575
End
Begin VB.Label Label2
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = " Address"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 855
Left = 360
TabIndex = 3
Top = 1440
Width = 1455
End
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = " Customer Name"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 375
Left = 360
TabIndex = 1
Top = 960
Width = 1455
End
End
Attribute VB_Name = "FrmPrintBill"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim MyDb As Database, MyRs As Recordset
Dim Amt
Private Sub BILLENTRY()
List1.Clear
List2.Clear
List3.Clear
List4.Clear
Text1 = ""
Text2 = ""
Text3 = ""
Text6 = ""
Text7 = ""
Dim Amt, SL, RC, Rs
SL = 0
On Error Resume Next
SQL = "select * from PRINTDB where ID='" & Text10.Text & "'"
Set MyDb = DBEngine.Workspaces(0).OpenDatabase("D:\HOTEL\PRINT\PRINT.MDB")
Set MyRs = MyDb.OpenRecordset(SQL, dbOpenDynaset)
Text1.Text = MyRs!Name
Text2.Text = MyRs!ADDRESS
Text3.Text = MyRs!NOOFDAYS
Text9.Text = MyRs!checkoutdate
Text8.Text = MyRs!checkindate
SL = SL + 1
List1.AddItem SL
List2.AddItem "LODGING"
Amt = MyRs!lodging
List3.AddItem MyRs!ROOMCHARGES & "/="
List4.AddItem Amt & "/="
Text11.Text = Amt
Amt = ""
SL = SL + 1
List1.AddItem SL
List2.AddItem "ROOM SERVICE"
Amt = Val(MyRs!NOOFDAYS) * 50
List3.AddItem "50" & "/="
List4.AddItem Amt & "/="
Text12.Text = Amt
SL = SL + 1
List1.AddItem SL
List2.AddItem "FOODING CHARGES"
List3.AddItem MyRs!FOODING & "/="
Amt = MyRs!FOODING
List4.AddItem Amt & "/="
Text13.Text = Amt
Text6.Text = Val(Text11.Text) + Val(Text12.Text) + Val(Text13.Text) & "/="
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
Me.BackColor = vbWhite
Me.Width = 10965
Command2.Visible = False
Me.PrintForm
Command2.Visible = True
Me.Width = 13425
Me.BackColor = &HC0E0FF
Do While Not MyRs.EOF
MyRs.Edit
MyRs!printstatus = "DONE"
MyRs.Update
MyRs.MoveNext
Loop
List5.Clear
Form_Load
List1.Clear
List2.Clear
List3.Clear
List4.Clear
Text1 = ""
Text2 = ""
Text3 = ""
Text6 = ""
Text7 = ""
Command2.Enabled = False
End Sub
Private Sub Form_Load()
Me.Left = MDIForm1.Left + 1000
Me.Top = MDIForm1.Top + 1000
SQL = "select * from PRINTDB where PRINTSTATUS='" & "NOTDONE" & "'"
Set MyDb = DBEngine.Workspaces(0).OpenDatabase("D:\HOTEL\PRINT\PRINT.MDB")
Set MyRs = MyDb.OpenRecordset(SQL, dbOpenDynaset)
Do While Not MyRs.EOF
List5.AddItem MyRs!ID
MyRs.MoveNext
Loop
End Sub
Private Sub List5_Click()
Command2.Enabled = True
Text10.Text = List5.Text
BILLENTRY
End Sub
Private Sub Timer1_Timer()
Text4.Text = "Date:- " & Format(Now, "DD-MMMM-YY") & " Time:- " & Format(Now, "HH:MM AM/PM")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -