Beruflich Dokumente
Kultur Dokumente
Reception report
Telephone operator
Business centre
Food report
Information report
Coding
Private Sub addnew_Click() If rs.State Then rs.Close End If i = InputBox("Enter food ID") rs.Open "select * from tel", cn, adOpenDynamic, adLockOptimistic rs.MoveFirst While Not rs.EOF If rs(0) = i Then Text1.Text = rs(0) Text2.Text = rs(1) Text3.Text = rs(2) Text4.Text = rs(3)
End If rs.MoveNext
Private Sub Command1_Click() If rs.State Then rs.Close End If rs.Open "select * from tel", cn, adOpenDynamic, adLockOptimistic rs.MoveLast Text1.Text = rs(0) Text2.Text = rs(1) Text3.Text = rs(2) Text4.Text = rs(3)
End Sub
Private Sub Command2_Click() If rs.State Then rs.Close End If rs.Open "select * from tel", cn, adOpenDynamic, adLockOptimistic
rs.MoveNext If rs.EOF = True Then rs.MoveLast End If Text1.Text = rs(0) Text2.Text = rs(1) Text3.Text = rs(2) Text4.Text = rs(3)
End Sub
Private Sub Command3_Click() If rs.State Then rs.Close End If rs.Open "select * from tel ", cn, adOpenDynamic, adLockOptimistic rs.MovePrevious If rs.BOF = True Then rs.MoveFirst
Private Sub Command4_Click() If rs.State Then rs.Close End If rs.Open "select * from tel ", cn, adOpenDynamic, adLockOptimistic rs.MoveFirst Text1.Text = rs(0) Text2.Text = rs(1) Text3.Text = rs(2) Text4.Text = rs(3)
End Sub
Private Sub delete_Click() If rs.State Then rs.Close End If rs.Open "delete from tel where room='" & Text1.Text & "'", cn, adOpenDynamic, adLockOptimistic MsgBox "record deleted" Call assign End Sub
End Sub
Private Sub Form_Load() cn.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=;Persist Secuity Info=Tue" If rs.State = adStateOpen Then rs.Close End If
End Sub
Private Sub save_Click() rs.Open "insert into tel values('" & Text1.Text & "','" & Text2.Text & "','" & Text3.Text & "'," & Text4.Text & ")", cn, adOpenDynamic, adLockOptimistic MsgBox "record saved" Call assign End Sub
Private Sub UPDATE_Click() If rs.State Then rs.Close End If rs.Open "update tel set name='" & Text2.Text & "',caller='" & Text3.Text & "',phone=" & Text4.Text & " where room='" & Text1.Text & "'", cn, adOpenDynamic, adLockOptimistic Call assign MsgBox "RECORD UPDATED" End Sub Public Sub assign() Text1.Text = "" Text2.Text = "" Text3.Text = " " Text4.Text = " "
End Sub
Private Sub addnew_Click() If rs.State Then rs.Close End If i = InputBox("Enter food ID") rs.Open "select * from bus1", cn, adOpenDynamic, adLockOptimistic rs.MoveFirst While Not rs.EOF If rs(0) = i Then Text1.Text = rs(0) Text2.Text = rs(1) Text3.Text = rs(2) Text4.Text = rs(3)
Private Sub Command1_Click() If rs.State Then rs.Close End If rs.Open "select * from bus1", cn, adOpenDynamic, adLockOptimistic rs.MoveLast Text1.Text = rs(0) Text2.Text = rs(1) Text3.Text = rs(2) Text4.Text = rs(3) Text5.Text = rs(4)
End Sub
rs.Close End If rs.Open "select * from bus1", cn, adOpenDynamic, adLockOptimistic rs.MoveNext If rs.EOF = True Then rs.MoveLast End If Text1.Text = rs(0) Text2.Text = rs(1) Text3.Text = rs(2) Text4.Text = rs(3) Text5.Text = rs(4)
End Sub
Private Sub Command3_Click() If rs.State Then rs.Close End If rs.Open "select * from bus1 ", cn, adOpenDynamic, adLockOptimistic
End If Text1.Text = rs(0) Text2.Text = rs(1) Text3.Text = rs(2) Text4.Text = rs(3) Text5.Text = rs(4)
Private Sub Command4_Click() If rs.State Then rs.Close End If rs.Open "select * from bus1 ", cn, adOpenDynamic, adLockOptimistic rs.MoveFirst Text1.Text = rs(0) Text2.Text = rs(1) Text3.Text = rs(2) Text4.Text = rs(3)
Text5.Text = rs(4)
End Sub
Private Sub delete_Click() If rs.State Then rs.Close End If rs.Open "delete from bus1 where id=" & Text1.Text & "", cn, adOpenDynamic, adLockOptimistic MsgBox "record deleted" Call assign End Sub
End Sub
Private Sub Form_Load() cn.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=;Persist Secuity Info=Tue" If rs.State = adStateOpen Then rs.Close End If
End Sub Private Sub save_Click() rs.Open "insert into bus1 values(" & Text1.Text & ",'" & Text2.Text & "'," & Text3.Text & "," & Text4.Text & ",'" & Text5.Text & "')", cn, adOpenDynamic, adLockOptimistic MsgBox "record saved" Call assign End Sub
Private Sub UPDATE_Click() If rs.State Then rs.Close End If rs.Open "update bus1 set name='" & Text2.Text & "',usage=" & Text3.Text & ",amount=" & Text4.Text & ",room='" & Text5.Text & "'where id=" & Text1.Text & "", cn, adOpenDynamic, adLockOptimistic Call assign MsgBox "RECORD UPDATED" End Sub Public Sub assign() Text1.Text = "" Text2.Text = "" Text3.Text = " " Text4.Text = " " Text5.Text = " "
End Sub