Sub TestButtons()
Dim question As String
Dim bts As Integer
Dim myTitle As String
Dim myButton As Integer
question = "Do you want to preview the report now?"
bts = vbYesNoCancel + vbQuestion + vbDefaultButton1
myTitle = "Report"
myButton = MsgBox(prompt:=question, buttons:=bts, Title:=myTitle)
Select Case myButton
Case 6
DoCmd.OpenReport"Sales by Year", acPreview
Case 7
MsgBox"You can review the report later."
Case Else
MsgBox"You pressed Cancel."
End Select
End Sub
\\\\\\\\\\\\\\\\\\\
Select Case myNumber
Case Is <= 10
MsgBox"The number is less than or equal to 10."
Case 11
MsgBox"You entered 11."
Case Is >= 100
MsgBox "The number is greater than or equal to 100."
Case Else
MsgBox "The number is between 12 and 99."
End Select
\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Sub DisplayDiscount()
Dim unitsSold As Integer
Dim myDiscount As Single
unitsSold = InputBox("Enter the number of sold units:")
myDiscount= GetDiscount(unitsSold)
MsgBox myDiscount
End Sub
\\\\\\\\\\\\\\\\\
Select Case unitsSold
Case 1 To 200
GetDiscount = 0.05
Case 201 To 500
GetDiscount = 0.1
Case 501 To 1000
GetDiscount = 0.15
Case Is > 1000
GetDiscount = 0.2
End Select
\\\\End Function
\\\\\\\\\\\\\\\
مسلسل | اسم الملف | المدة ب الدقيقة | لينك |
---|---|---|---|
1 | 001 MS Access VBA Grouping Code , Variables And Data Types | 18 | https://youtu.be/iT1bFbliG5E |
2 | 002 MS Access VBA – Writing First Code 2 programs in one form | 16 | https://youtu.be/h-jXH_kcE4c |
3 | 003 MS Access VBA – Writing First 2 programs | 14 | https://youtu.be/Z36lpESNk8k |
4 | 004 MS Access VBA –Decision Making if then | 24 | https://youtu.be/phtKVh-QQ9w |
5 | 005 MS Access VBA –Decision Making if then elsif nested if | 16 | https://youtu.be/IRYnGtcoJKo |
6 | 006 MS Access VBA –Decision Making Select Case | 20 | https://youtu.be/32OckF0Zv6I |
110 | قائمة ملفات تعلم اكسيس المستوى الاول MS Access 380 min | https://www.youtube.com/playlist?list=PLMmy9Ec9B98wxI2RWVrjjtyV2knTFoR1t |