-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnvqform.frm
More file actions
64 lines (54 loc) · 2.28 KB
/
nvqform.frm
File metadata and controls
64 lines (54 loc) · 2.28 KB
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
VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} nvqform
Caption = "NVQ Data"
ClientHeight = 8400
ClientLeft = 45
ClientTop = 435
ClientWidth = 14145
OleObjectBlob = "nvqform.frx":0000
StartUpPosition = 1 'CenterOwner
End
Attribute VB_Name = "nvqform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cancelbutton_Click()
Unload Me
End Sub
Private Sub searchbutton_Click()
FormatDateTime (Date = [vbShortDate])
Dim a As Integer, fname As String, sname As String, role As String, sdate As Date
Dim dept As String, ltwo As String, bytwo As String, datetwo As Date
Dim lthree As String, bythree As String, datethree As Date, course As String
Dim level As Integer, started As Date, leveltwo As String, datefour As Date
Dim levelthree As String, datefive As Date
On Error Resume Next
ActiveSheet.Cells.Find(what:=dataform.searchbox.Value, after:=ActiveCell, LookIn:=xlValues, lookat:=xlPart, _
searchorder:=xlByRows, searchdirection:=xlNext, MatchCase:=False, searchformat:=False).Activate
a = ActiveCell.Row
dataform.fname.Value = Cells(a, 1).Value
dataform.sname.Value = Cells(a, 2).Value
dataform.role.Value = Cells(a, 3).Value
dataform.sdate.Value = Cells(a, 4).Value
dataform.sdate = Format(Cells(a, 4), "dd/mm/yy")
dataform.dept.Value = Cells(a, 5).Value
dataform.ltwo.Value = Cells(a, 6).Value
dataform.bytwo.Value = Cells(a, 7).Value
dataform.datetwo.Value = Cells(a, 8).Value
dataform.datetwo = Format(Cells(a, 8), "dd/mm/yy")
dataform.lthree.Value = Cells(a, 9).Value
dataform.bythree.Value = Cells(a, 10).Value
dataform.datethree.Value = Cells(a, 11).Value
dataform.datethree = Format(Cells(a, 11), "dd/mm/yy")
dataform.course.Value = Cells(a, 12).Value
dataform.level.Value = Cells(a, 13).Value
dataform.started.Value = Cells(a, 14).Value
dataform.started = Format(Cells(a, 14), "dd/mm/yy")
dataform.leveltwo.Value = Cells(a, 15).Value
dataform.datefour.Value = Cells(a, 16).Value
dataform.datefour = Format(Cells(a, 16), "dd/mm/yy")
dataform.levelthree.Value = Cells(a, 17).Value
dataform.datefive.Value = Cells(a, 18).Value
dataform.datefive = Format(Cells(a, 18), "dd/mm/yy")
End Sub