-
Notifications
You must be signed in to change notification settings - Fork 0
/
FrmRekPerPegawai.frm
208 lines (201 loc) · 6.1 KB
/
FrmRekPerPegawai.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
VERSION 5.00
Object = "{00025600-0000-0000-C000-000000000046}#5.2#0"; "Crystl32.OCX"
Begin VB.Form FrmRekPerpegawai
BackColor = &H0080C0FF&
BorderStyle = 1 'Fixed Single
Caption = "Rekomendasi Per-Pegawai"
ClientHeight = 1320
ClientLeft = 45
ClientTop = 330
ClientWidth = 4620
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 1320
ScaleWidth = 4620
Begin Crystal.CrystalReport Lap
Left = 1620
Top = 1440
_ExtentX = 741
_ExtentY = 741
_Version = 348160
PrintFileLinesPerPage= 60
End
Begin VB.CommandButton Command3
Caption = "&Tutup"
BeginProperty Font
Name = "Century"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3540
TabIndex = 6
Top = 840
Width = 960
End
Begin VB.CommandButton Command2
Caption = "&Preview"
BeginProperty Font
Name = "Century"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2550
TabIndex = 5
Top = 840
Width = 960
End
Begin VB.CommandButton Command1
Caption = "&Cetak"
BeginProperty Font
Name = "Century"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1560
TabIndex = 4
Top = 840
Width = 960
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "Century"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 1260
TabIndex = 3
Text = "Text1"
Top = 435
Width = 3255
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "Century"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 1260
TabIndex = 0
Text = "Combo1"
Top = 75
Width = 1995
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Nama Pegawai"
BeginProperty Font
Name = "Century"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 60
TabIndex = 2
Top = 480
Width = 1860
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "NIP Pegawai"
BeginProperty Font
Name = "Century"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 60
TabIndex = 1
Top = 120
Width = 1860
End
End
Attribute VB_Name = "FrmRekPerpegawai"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim DbPegawai As Database
Dim RecPegawai As Recordset
Private Sub Combo1_Change()
Combo1_Click
End Sub
Private Sub Combo1_Click()
RecPegawai.Seek "=", Combo1.Text
If Not RecPegawai.NoMatch Then
Text1.Text = RecPegawai!namapeg
Command1.Enabled = True
Command2.Enabled = True
Else
Text1.Text = ""
Command1.Enabled = False
Command2.Enabled = False
End If
End Sub
Private Sub Command1_Click()
Lap.ReportFileName = App.Path & "\daftarrekomendasi.rpt"
Lap.DataFiles(0) = App.Path & "\pdam.mdb"
Lap.WindowState = crptMaximized
Lap.Destination = crptToPrinter
Lap.ReplaceSelectionFormula "{pegawai.nip_peg}='" & Trim(Combo1.Text) & "'"
Lap.Action = 2
End Sub
Private Sub Command2_Click()
Lap.ReportFileName = App.Path & "\daftarrekomendasi.rpt"
Lap.DataFiles(0) = App.Path & "\pdam.mdb"
Lap.WindowState = crptMaximized
Lap.Destination = crptToWindow
Lap.ReplaceSelectionFormula "{pegawai.nip_peg}='" & Trim(Combo1.Text) & "'"
Lap.Action = 2
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_activate()
Set DbPegawai = OpenDatabase(App.Path & "\pdam.mdb")
Set RecPegawai = DbPegawai.OpenRecordset("pegawai")
RecPegawai.Index = "idxpegawai"
Text1.Text = ""
Command1.Enabled = False
Command2.Enabled = False
Combo1.Clear
Do While Not RecPegawai.EOF
Combo1.AddItem RecPegawai!nip_peg
RecPegawai.MoveNext
Loop
End Sub