320 likes | 466 Views
Proyek Queri-queri Lanjut dan Sub-subqueri. Proyek Queri-queri Lanjut dan Sub-subqueri. Variables dan Data. Integer. 2 bytes -32768 32767. Long. 4 bytes +/- 2,147,483,648. Single. 4 bytes +/- 3.402823 E38 +/- 1.401298 E-45. Double. 8 bytes +/- 1.79769313386232 E-308
E N D
Integer • 2 bytes • -32768 32767
Long • 4 bytes • +/- 2,147,483,648
Single • 4 bytes • +/- 3.402823 E38 • +/- 1.401298 E-45
Double • 8 bytes • +/- 1.79769313386232 E-308 • +/- 4.94065645841247 E-324
Currency • 8 bytes • +/- 922,337,203,685,477.5808
Variant • Any data Type • Null
LCase, UCase Format StrComp Len InStr Chr, Asc String Trim, LTrim, RTrim Left, Right, Mid & Concatenation Fungsi String
Len • Len"Ramanujan") = 9
InStr • ("8764 main"," ") = 5
String • String(5, "a") = "aaaaa"
Trim, LTrim, RTrim • Trim(" Maria ") = "Maria"
Left, Right, Mid • Left("jackson",5) = "Jacks"
& Concatenation • "Frank" & "Rose = "FrankRose"
Fungsi Matematis Standar • Numeric
Numeric • Exp, Log • Atn, Cos, Sin, Tan • Sqr • Abs • Sgn • Int, Fix • Rnd, Randomize
Basic Conditions • If (conditiona1) Then statement for true • Else • Statement for false If (condition2) Then statements for true • End If • End If
Nested Conditions • Response = MsgBox ( . . .) If (response = vbYes) Then 'statements for Yes • Else • If (response = vbNo) Then 'statements for No • Else • 'statements for Cancel End If • End If
Pernyataan Select • Response = MsgBox( . . . ) Select Case response case vbYes • 'statements for Yes Case vbNo • 'statements for No Case vbCancel • 'statements for cancel End Case
Subroutine StatusMessage dapat dipanggil dari lokasi mana saja. • Main program ... StatusMessage "trying to connect." ... StatusMessage "verifying access." ... End main program Sub StatusMessage (Msg As String) 'Display Msg, location, color End Sub
Form • Button1 • Button2
Form-Module Code • Sub Button1_Click() • Dim I1 As Integer • I1 = 3 • End Sub • Sub Button2_Click() • Dim i1 As Integer • I1 = 7 • End Sub