|
-
Aug 13th, 2001, 04:45 PM
#1
Thread Starter
New Member
what's wrong with this function?
Public Function LastPaymentDate( Conn As ADODB.Connection, _
AccountNumber As String) As Date
Dim RS As ADODB.Recordset
Set RS = Conn.Execute( _
"SELECT * " _
& "FROM AR " _
& "WHERE AccountNumber = '" & AccountNumber & "' " _
& "ORDER BY PostingDate DESC")
LastPaymentDate = IIf(RS.EOF, 0, RS("PostingDate"))
RS.Close
Set RS = Nothing
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|