Before I start, I am new to VB programming. I am converting a DOS payroll program to VB 6.0. I am using an Access 2000 database with 132 fields.
Finding an employee to display all their data is extremely slow. There must be a faster way to do it, or I'm going to have major problems.
Here is how I am currently searching for the employee and displaying the data:
Public Sub FindEmp(Num As String)
ErrFl$ = ""
sSQL$ = "SELECT * From Master"
rsAccess.Open sSQL$, Access, adOpenKeyset, adLockOptimistic
With rsAccess
.MoveFirst
.Find "PAYEMP='" & Num & "'", , , 0
End With
If rsAccess.EOF = True Then
ErrFl$ = "Y"
Exit Sub
End If
""then set textboxes to the appropriate fields
Is this the only way I can get all the fields to a record? It runs so slowly on my machine, and I have a fairly quick system. I do not want to bind the text boxes, because certain fields will not be displayed to all users. Any advice would be appreciated.
Thanks
Catrina [sig][/sig]
Finding an employee to display all their data is extremely slow. There must be a faster way to do it, or I'm going to have major problems.
Here is how I am currently searching for the employee and displaying the data:
Public Sub FindEmp(Num As String)
ErrFl$ = ""
sSQL$ = "SELECT * From Master"
rsAccess.Open sSQL$, Access, adOpenKeyset, adLockOptimistic
With rsAccess
.MoveFirst
.Find "PAYEMP='" & Num & "'", , , 0
End With
If rsAccess.EOF = True Then
ErrFl$ = "Y"
Exit Sub
End If
""then set textboxes to the appropriate fields
Is this the only way I can get all the fields to a record? It runs so slowly on my machine, and I have a fairly quick system. I do not want to bind the text boxes, because certain fields will not be displayed to all users. Any advice would be appreciated.
Thanks
Catrina [sig][/sig]