Dim dbsDb As Database Set dbsDb = OpenDatabase("Inventory.mdb")
Global dbsDb As Database Sub Main() Set dbsDb = OpenDatabase("Inventory.mdb")
Dim qry As QueryDef Dim rst As Recordset Set qry = dbsDb.QueryDefs("ComputerById") qry.Parameters("Id") = "34673"
Set rst = qry.OpenRecordset
do while not rst.EOF ... loop
If not rst.EOF Then ...
MsgBox rst("ItemName")
if rst.EOF rst.AddNew Else rst.Edit End If rst("ItemName") = "The Art of Computer Programming"
rst.Update
rst.Close qry.Close dbsDB.Close
Dim όνομα([κάτω-όριο Το] άνω-όριο [, [κάτω-όριο Το] άνω-όριο] ...) as τύπος
Dim Values(10) as Integer Dim RoomEmpty(100 to 999) as Boolean Dim ChessBoard(7, 7) as String
Values(3) = 178 For i= 100 to 999 RoomEmpty(i) = True Next i ChessBoard(0, 1) = "Castle"
Type όνομα πεδίο1 As τύπος πεδίο2 As τύπος ... End Type
Type CustomerEntry Name As String Phone As String Balance As Currency End Type
Dim CurrentCustomer As CustomerEntry Dim AllCustomers(100) As CustomerEntry
Dim TotalBalance as Currency MsgBox CurrentCustomer.Name + CurrentCustomer.Phone For i = 1 to 100 TotalBalance = TotalBalance + AllCustomers(i).Balance Next i
Ποσό | Επιτόκιο |
0-999.999 | 2.25 |
1.000.000-4.999.999 | 2.5 |
5.000.000-10.000.000 | 2.8 |
10.000.000 και άνω | 2.9 |