Results 1 to 2 of 2

Thread: [RESOLVED] Start Day

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2000
    Posts
    462

    Resolved [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
    Don
    (OLD DOS Programmer)

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width