March 17th, 2010, 01:33 AM
posted to microsoft.public.access.reports
|
|
Wrong amount of arguments!
You're welcome. Glad you were able to "fix" those last few items!
--
Ken Snell
http://www.accessmvp.com/KDSnell/
"Bob Vance" wrote in message
...
Got it
changed AS ClientDetailField" to AS ClientDetail"
Brilliant thanks Bob
"Bob Vance" wrote in message
...
Thanks Ken got it going now, just gatting a parameter error on
ClientDetail
Will try and work it out
Regards Bob
"Bob Vance" wrote in message
...
Ken i am getting a error ' expect end of statement on - ")& "
4 of the last six symbols
Thanks bob
"Ken Snell" wrote in message
...
Try this:
strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
& "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
& "tblInvoice.OwnerPercentAmount, " & _
"IIf(Len(tblInvoice.ClientDetail & """") = 0, " & _
"IIf(Len(tblInvoice.HorseName & " & _
""""") = 0, funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID),
" & _
"tblInvoice.HorseName), tblInvoice.ClientDetail) AS ClientDetailField"
& _
" FROM tblInvoice WHERE" _
& "
tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!c bClientName.value" _
& " AND tblInvoice.InvoiceDate=" & _
Format(Forms!frmMonthlyClientInvoice!tbDateFrom.va lue, _
"\#mm\/dd\/yyyy\#") _
& " AND tblInvoice.InvoiceDate=" & _
Format(Forms!frmMonthlyClientInvoice!tbDateTo.valu e, _
"\#mm\/dd\/yyyy\#") ") & ";"
--
Ken Snell
http://www.accessmvp.com/KDSnell/
|