Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Easier Way To Store SQL Results?
I Am Using SQL Alot In A Project, But For Some Reason I Feel I'm Doing Way More Work Then I Have To. Curently, I Am Storing Variables By Checking Each Field, Then Storing Accordingly.
Do Until rs.EOF
EmpSum.CurRec = EmpSum.CurRec + 1
CmdEdit(EmpSum.CurRec).Visible = True
For Each fld In rs.Fields
If fld.Name = "11a" Then
EmpSum.SumHours(1, 1, 1) = fld.Value
ElseIf fld.Name = "12a" Then
EmpSum.SumHours(1, 2, 1) = fld.Value
ElseIf fld.Name = "13a" Then
EmpSum.SumHours(1, 3, 1) = fld.Value
ElseIf fld.Name = "14a" Then
EmpSum.SumHours(1, 4, 1) = fld.Value
There Must Be An Easier Way To Do This Then To Check The Field Name For Every Record.
Any Ideas Would Be Appreciated.