osi33015
11-10-2004, 11:56 AM
Hi! i have a small database and amworking with the Table Called Employees
what i want to do is add all the records from the Employees table to labels
here is some code so that you will undestand me better
Set MyRecSet = MyConn.Execute("SELECT FirstName, LastName, EmpID,DepNum,SSS FROM Employees")
Do Until MyRecSet.EOF
strName = MyRecSet!FirstName
strlastname = MyRecSet!LastName
strEmpId = MyRecSet!EmpID
strDepId = MyRecSet!DepNum
strSSS = MyRecSet!SSS
MyRecSet.MoveNext
Loop
lblname.Caption = strName
lbllastname.Caption = strlastname
lblEmpID.Caption = strEmpId
lblDepNum.Caption = strDepId
lblSSS.Caption = strSSS
lblname2.Caption = strName
lbllastname2.Caption = strlastname
lblEmpID2.Caption = strEmpId
lblDepNum2.Caption = strDepId
lblSSS2.Caption = strSSS
In lblname2 and the rest, what it comes out is the same as lblname, i would like to keep on adding the next row from the Employees table
Thank you in advance
what i want to do is add all the records from the Employees table to labels
here is some code so that you will undestand me better
Set MyRecSet = MyConn.Execute("SELECT FirstName, LastName, EmpID,DepNum,SSS FROM Employees")
Do Until MyRecSet.EOF
strName = MyRecSet!FirstName
strlastname = MyRecSet!LastName
strEmpId = MyRecSet!EmpID
strDepId = MyRecSet!DepNum
strSSS = MyRecSet!SSS
MyRecSet.MoveNext
Loop
lblname.Caption = strName
lbllastname.Caption = strlastname
lblEmpID.Caption = strEmpId
lblDepNum.Caption = strDepId
lblSSS.Caption = strSSS
lblname2.Caption = strName
lbllastname2.Caption = strlastname
lblEmpID2.Caption = strEmpId
lblDepNum2.Caption = strDepId
lblSSS2.Caption = strSSS
In lblname2 and the rest, what it comes out is the same as lblname, i would like to keep on adding the next row from the Employees table
Thank you in advance