-
[RESOLVED] Start Day
D=Day for this Resords set By Account
If Works With out eh Start date but loads all reoords for this account number
For All days in the database
I get Efo Error in Extract
Code:
Sub Extractor()
Dim Acct, Days$, StrSql As String
Set Record_Sets = New ADODB.Recordset
Acct = Val(RRR!Number)
StrSql = "SELECT Month,Start_day,Year,Start_time,Stop_Time,Hours,Min,Overtime " _
& "FROM Pay_Hours " _
& "WHERE Number = '" & Acct & "'"
Debug.Print StrSql; Data_Connection(1)
Record_Sets.Open StrSql, Data_Connection(1), adOpenStatic, adLockReadOnly, adCmdText
Extract
Record_Sets.Close
End Sub
Sub Extract()
Dim Colx
Cq = 1
Row = 1
Do While Not Record_Sets.EOF
For ColX = 0 To Record_Sets.Fields.Count - 1
If Trim(Record_Sets.Fields(ColX).Value & "") > "" And Val(Record_Sets.Fields(ColX).Value & "") = D Then 'D being Day of Month
Data(Row, ColX + 1) = Record_Sets.Fields(ColX).Value & ""
Else
Data(Row, ColX + 1) = ""
End If
Next
Record_Sets.MoveNext
Loop
End Sub
-
Re: [RESOLVED] Start Day
This is marked resolved with no posted resolution.
Did you figure out the problem? If so, please post what you did. It could help someone else with the same or similiar problem.
Thanks. :)