Wrong amount of arguments!

What I want is tblInvoice.ClientDetail but if blank tblInvoice.HorseName but 
if blank 
funGetHorseName(tblInvoice.InvoiceID,tblInvoice.HorseID),tblInvoice.HorseName)

& "iif(tblInvoice.ClientDetail='',tblInvoice.HorseName=' 
',funGetHorseName(tblInvoice.InvoiceID,tblInvoice.HorseID),tblInvoice.HorseName) 
AS ClientDetail," _

-- 
Thanks in advance for any help with this......Bob
MS Access 2007 accdb
Windows  XP Home Edition Ver 5.1 Service Pack 3


0
Bob
3/13/2010 5:19:00 AM
access.reports 4434 articles. 0 followers. Follow

11 Replies
1009 Views

Similar Articles

[PageSpeed] 57

Not sure I'm following comletely correctly, but perhaps this is what you 
seek:

IIf(Len(tblInvoice.ClientDetail & "") = 0, IIf(Len(tblInvoice.HorseName & 
"") = 0, funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), 
tblInvoice.HorseName), tblInvoice.ClientDetail)

-- 

        Ken Snell
http://www.accessmvp.com/KDSnell/


"Bob Vance" <rjvance@ihug.co.nz> wrote in message 
news:hnf781$kve$1@lust.ihug.co.nz...
> What I want is tblInvoice.ClientDetail but if blank tblInvoice.HorseName 
> but if blank 
> funGetHorseName(tblInvoice.InvoiceID,tblInvoice.HorseID),tblInvoice.HorseName)
>
> & "iif(tblInvoice.ClientDetail='',tblInvoice.HorseName=' 
> ',funGetHorseName(tblInvoice.InvoiceID,tblInvoice.HorseID),tblInvoice.HorseName) 
> AS ClientDetail," _
>
> -- 
> Thanks in advance for any help with this......Bob
> MS Access 2007 accdb
> Windows  XP Home Edition Ver 5.1 Service Pack 3
>
> 


0
Ken
3/13/2010 2:16:57 PM
"Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
news:ezUnWfrwKHA.6140@TK2MSFTNGP05.phx.gbl...
> Not sure I'm following comletely correctly, but perhaps this is what you 
> seek:
>
> IIf(Len(tblInvoice.ClientDetail & "") = 0, IIf(Len(tblInvoice.HorseName & 
> "") = 0, funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), 
> tblInvoice.HorseName), tblInvoice.ClientDetail)
>
> -- 
>
>        Ken Snell
> http://www.accessmvp.com/KDSnell/
>
>
Thanks Ken, How do I incorerate it into this string....Regards Bob

Private Sub Report_Open(Cancel As Integer)

Me.Caption = "Monthly Horse Invoice Report"

Dim strSQL As String

strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
& "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
& "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
& " tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbHorseName.value" _
& " AND tblInvoice.InvoiceDate>=" & 
Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") _
& " AND tblInvoice.InvoiceDate<=" & 
Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & ";"
Report.RecordSource = strSQL


End Sub


0
Bob
3/13/2010 8:37:55 PM
Sorry, I am not seeing anything in the VBA code where it appears logical for 
the expression to be inserted? Could you provide more information? Is this 
expression meant to replace one of the fields currently in your string? Or 
to be a new field in the string?

-- 

        Ken Snell
http://www.accessmvp.com/KDSnell/


"Bob Vance" <rjvance@ihug.co.nz> wrote in message 
news:hngt2u$kns$1@lust.ihug.co.nz...
>
> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
> news:ezUnWfrwKHA.6140@TK2MSFTNGP05.phx.gbl...
>> Not sure I'm following comletely correctly, but perhaps this is what you 
>> seek:
>>
>> IIf(Len(tblInvoice.ClientDetail & "") = 0, IIf(Len(tblInvoice.HorseName & 
>> "") = 0, funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), 
>> tblInvoice.HorseName), tblInvoice.ClientDetail)
>>
>> -- 
>>
>>        Ken Snell
>> http://www.accessmvp.com/KDSnell/
>>
>>
> Thanks Ken, How do I incorerate it into this string....Regards Bob
>
> Private Sub Report_Open(Cancel As Integer)
>
> Me.Caption = "Monthly Horse Invoice Report"
>
> Dim strSQL As String
>
> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
> & " tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbHorseName.value" _
> & " AND tblInvoice.InvoiceDate>=" & 
> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") _
> & " AND tblInvoice.InvoiceDate<=" & 
> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & ";"
> Report.RecordSource = strSQL
>
>
> End Sub
>
> 


0
Ken
3/14/2010 6:34:11 PM
Thanks Ken, my Original code for reporting Invoices for horses is below I am 
trying to create a code for reporting Invoices for Clients
Regards Bob

Private Sub Report_Open(Cancel As Integer)

Me.Caption = "Monthly Horse Invoice Report"
Dim strSQL As String
strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
& "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
& "iif(tblInvoice.HorseName=' 
',funGetHorseName(tblInvoice.InvoiceID,tblInvoice.HorseID),tblInvoice.HorseName) 
AS HorseName," _
& "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
& " tblInvoice.HorseID=Forms!frmMonthlyHorseInvoice!cbHorseName.value" _
& " AND tblInvoice.InvoiceDate>=" & 
Format("Forms!frmMonthlyHorseInvoice!tbDateFrom.value", "mm/dd/yyyy") _
& " AND tblInvoice.InvoiceDate<=" & 
Format("Forms!frmMonthlyHorseInvoice!tbDateTo.value", "mm/dd/yyyy") & ";"
Report.RecordSource = strSQL

End Sub
-------------------------------------------------------
My Code for Client reporting Invoices!

Private Sub Report_Open(Cancel As Integer)

Me.Caption = "Monthly Client Invoice Report"
Dim strSQL As String
strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
& "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
& "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
& " tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbClientName.value" _
& "IIf(Len(tblInvoice.ClientDetail & "") = 0, IIf(Len(tblInvoice.HorseName & 
"") = 0, funGetHorseName(tblInvoice.InvoiceID, 
tblInvoice.HorseID),tblInvoice.HorseName), tblInvoice.ClientDetail)" _
& " AND tblInvoice.InvoiceDate>=" & 
Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") _
& " AND tblInvoice.InvoiceDate<=" & 
Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & ";"
Report.RecordSource = strSQL

End Sub



"Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
news:%23OoqxT6wKHA.5340@TK2MSFTNGP04.phx.gbl...
> Sorry, I am not seeing anything in the VBA code where it appears logical 
> for the expression to be inserted? Could you provide more information? Is 
> this expression meant to replace one of the fields currently in your 
> string? Or to be a new field in the string?
>
> -- 
>
>        Ken Snell
> http://www.accessmvp.com/KDSnell/
>
>
> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
> news:hngt2u$kns$1@lust.ihug.co.nz...
>>
>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>> news:ezUnWfrwKHA.6140@TK2MSFTNGP05.phx.gbl...
>>> Not sure I'm following comletely correctly, but perhaps this is what you 
>>> seek:
>>>
>>> IIf(Len(tblInvoice.ClientDetail & "") = 0, IIf(Len(tblInvoice.HorseName 
>>> & "") = 0, funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), 
>>> tblInvoice.HorseName), tblInvoice.ClientDetail)
>>>
>>> -- 
>>>
>>>        Ken Snell
>>> http://www.accessmvp.com/KDSnell/
>>>
>>>
>> Thanks Ken, How do I incorerate it into this string....Regards Bob
>>
>> Private Sub Report_Open(Cancel As Integer)
>>
>> Me.Caption = "Monthly Horse Invoice Report"
>>
>> Dim strSQL As String
>>
>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>> & " tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbHorseName.value" _
>> & " AND tblInvoice.InvoiceDate>=" & 
>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") _
>> & " AND tblInvoice.InvoiceDate<=" & 
>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>> ";"
>> Report.RecordSource = strSQL
>>
>>
>> End Sub
>>
>>
>
> 


0
Bob
3/14/2010 9:08:27 PM
Assuming you want that calculated field for which I gave the expression to 
be in the SELECT clause (watch for the mutiple, consecutive " characters):

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!cbClientName.value" _
& " AND tblInvoice.InvoiceDate>=" & _
Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") _
& " AND tblInvoice.InvoiceDate<=" & _
Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & ";"
-- 

        Ken Snell
http://www.accessmvp.com/KDSnell/



"Bob Vance" <rjvance@ihug.co.nz> wrote in message 
news:hnjj85$7a0$1@lust.ihug.co.nz...
> Thanks Ken, my Original code for reporting Invoices for horses is below I 
> am trying to create a code for reporting Invoices for Clients
> Regards Bob
>
> Private Sub Report_Open(Cancel As Integer)
>
> Me.Caption = "Monthly Horse Invoice Report"
> Dim strSQL As String
> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
> & "iif(tblInvoice.HorseName=' 
> ',funGetHorseName(tblInvoice.InvoiceID,tblInvoice.HorseID),tblInvoice.HorseName) 
> AS HorseName," _
> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
> & " tblInvoice.HorseID=Forms!frmMonthlyHorseInvoice!cbHorseName.value" _
> & " AND tblInvoice.InvoiceDate>=" & 
> Format("Forms!frmMonthlyHorseInvoice!tbDateFrom.value", "mm/dd/yyyy") _
> & " AND tblInvoice.InvoiceDate<=" & 
> Format("Forms!frmMonthlyHorseInvoice!tbDateTo.value", "mm/dd/yyyy") & ";"
> Report.RecordSource = strSQL
>
> End Sub
> -------------------------------------------------------
> My Code for Client reporting Invoices!
>
> Private Sub Report_Open(Cancel As Integer)
>
> Me.Caption = "Monthly Client Invoice Report"
> Dim strSQL As String
> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
> & " tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbClientName.value" _
> & "IIf(Len(tblInvoice.ClientDetail & "") = 0, IIf(Len(tblInvoice.HorseName 
> & "") = 0, funGetHorseName(tblInvoice.InvoiceID, 
> tblInvoice.HorseID),tblInvoice.HorseName), tblInvoice.ClientDetail)" _
> & " AND tblInvoice.InvoiceDate>=" & 
> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") _
> & " AND tblInvoice.InvoiceDate<=" & 
> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & ";"
> Report.RecordSource = strSQL
>
> End Sub
>
>
>
> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
> news:%23OoqxT6wKHA.5340@TK2MSFTNGP04.phx.gbl...
>> Sorry, I am not seeing anything in the VBA code where it appears logical 
>> for the expression to be inserted? Could you provide more information? Is 
>> this expression meant to replace one of the fields currently in your 
>> string? Or to be a new field in the string?
>>
>> -- 
>>
>>        Ken Snell
>> http://www.accessmvp.com/KDSnell/
>>
>>
>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>> news:hngt2u$kns$1@lust.ihug.co.nz...
>>>
>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>> news:ezUnWfrwKHA.6140@TK2MSFTNGP05.phx.gbl...
>>>> Not sure I'm following comletely correctly, but perhaps this is what 
>>>> you seek:
>>>>
>>>> IIf(Len(tblInvoice.ClientDetail & "") = 0, IIf(Len(tblInvoice.HorseName 
>>>> & "") = 0, funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), 
>>>> tblInvoice.HorseName), tblInvoice.ClientDetail)
>>>>
>>>> -- 
>>>>
>>>>        Ken Snell
>>>> http://www.accessmvp.com/KDSnell/
>>>>
>>>>
>>> Thanks Ken, How do I incorerate it into this string....Regards Bob
>>>
>>> Private Sub Report_Open(Cancel As Integer)
>>>
>>> Me.Caption = "Monthly Horse Invoice Report"
>>>
>>> Dim strSQL As String
>>>
>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>> & " tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbHorseName.value" 
>>> _
>>> & " AND tblInvoice.InvoiceDate>=" & 
>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") _
>>> & " AND tblInvoice.InvoiceDate<=" & 
>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>> ";"
>>> Report.RecordSource = strSQL
>>>
>>>
>>> End Sub
>>>
>>>
>>
>>
>
> 


0
Ken
3/15/2010 3:18:38 AM
Ken I am getting this error
The database engine can not find..........Thanks Bob
"IIf(Len(tblInvoice.ClientDetail & """") = 0, IIf(Len(tblInvoice.HorseName & 
"" & """") = 0, funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), " 
& _
"tblInvoice.HorseName), tblInvoice.ClientDetail) AS ClientDetailField" & _
" FROM tblInvoice WHERE" _


"Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
news:O3$k04%23wKHA.5036@TK2MSFTNGP02.phx.gbl...
> Assuming you want that calculated field for which I gave the expression to 
> be in the SELECT clause (watch for the mutiple, consecutive " characters):
>
> 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!cbClientName.value" _
> & " AND tblInvoice.InvoiceDate>=" & _
> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") _
> & " AND tblInvoice.InvoiceDate<=" & _
> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & ";"
> -- 
>
>        Ken Snell
> http://www.accessmvp.com/KDSnell/
>
>
>
> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
> news:hnjj85$7a0$1@lust.ihug.co.nz...
>> Thanks Ken, my Original code for reporting Invoices for horses is below I 
>> am trying to create a code for reporting Invoices for Clients
>> Regards Bob
>>
>> Private Sub Report_Open(Cancel As Integer)
>>
>> Me.Caption = "Monthly Horse Invoice Report"
>> Dim strSQL As String
>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>> & "iif(tblInvoice.HorseName=' 
>> ',funGetHorseName(tblInvoice.InvoiceID,tblInvoice.HorseID),tblInvoice.HorseName) 
>> AS HorseName," _
>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>> & " tblInvoice.HorseID=Forms!frmMonthlyHorseInvoice!cbHorseName.value" _
>> & " AND tblInvoice.InvoiceDate>=" & 
>> Format("Forms!frmMonthlyHorseInvoice!tbDateFrom.value", "mm/dd/yyyy") _
>> & " AND tblInvoice.InvoiceDate<=" & 
>> Format("Forms!frmMonthlyHorseInvoice!tbDateTo.value", "mm/dd/yyyy") & ";"
>> Report.RecordSource = strSQL
>>
>> End Sub
>> -------------------------------------------------------
>> My Code for Client reporting Invoices!
>>
>> Private Sub Report_Open(Cancel As Integer)
>>
>> Me.Caption = "Monthly Client Invoice Report"
>> Dim strSQL As String
>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>> & " tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbClientName.value" 
>> _
>> & "IIf(Len(tblInvoice.ClientDetail & "") = 0, 
>> IIf(Len(tblInvoice.HorseName & "") = 0, 
>> funGetHorseName(tblInvoice.InvoiceID, 
>> tblInvoice.HorseID),tblInvoice.HorseName), tblInvoice.ClientDetail)" _
>> & " AND tblInvoice.InvoiceDate>=" & 
>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") _
>> & " AND tblInvoice.InvoiceDate<=" & 
>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>> ";"
>> Report.RecordSource = strSQL
>>
>> End Sub
>>
>>
>>
>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>> news:%23OoqxT6wKHA.5340@TK2MSFTNGP04.phx.gbl...
>>> Sorry, I am not seeing anything in the VBA code where it appears logical 
>>> for the expression to be inserted? Could you provide more information? 
>>> Is this expression meant to replace one of the fields currently in your 
>>> string? Or to be a new field in the string?
>>>
>>> -- 
>>>
>>>        Ken Snell
>>> http://www.accessmvp.com/KDSnell/
>>>
>>>
>>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>>> news:hngt2u$kns$1@lust.ihug.co.nz...
>>>>
>>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>>> news:ezUnWfrwKHA.6140@TK2MSFTNGP05.phx.gbl...
>>>>> Not sure I'm following comletely correctly, but perhaps this is what 
>>>>> you seek:
>>>>>
>>>>> IIf(Len(tblInvoice.ClientDetail & "") = 0, 
>>>>> IIf(Len(tblInvoice.HorseName & "") = 0, 
>>>>> funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), 
>>>>> tblInvoice.HorseName), tblInvoice.ClientDetail)
>>>>>
>>>>> -- 
>>>>>
>>>>>        Ken Snell
>>>>> http://www.accessmvp.com/KDSnell/
>>>>>
>>>>>
>>>> Thanks Ken, How do I incorerate it into this string....Regards Bob
>>>>
>>>> Private Sub Report_Open(Cancel As Integer)
>>>>
>>>> Me.Caption = "Monthly Horse Invoice Report"
>>>>
>>>> Dim strSQL As String
>>>>
>>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>>> & " tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbHorseName.value" 
>>>> _
>>>> & " AND tblInvoice.InvoiceDate>=" & 
>>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") 
>>>> _
>>>> & " AND tblInvoice.InvoiceDate<=" & 
>>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>>> ";"
>>>> Report.RecordSource = strSQL
>>>>
>>>>
>>>> End Sub
>>>>
>>>>
>>>
>>>
>>
>>
>
> 


0
Bob
3/15/2010 5:24:17 PM
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!cbClientName.value" _
& " AND tblInvoice.InvoiceDate>=" & _
Format(Forms!frmMonthlyClientInvoice!tbDateFrom.value, _
"\#mm\/dd\/yyyy\#") _
& " AND tblInvoice.InvoiceDate<=" & _
Format(Forms!frmMonthlyClientInvoice!tbDateTo.value, _
"\#mm\/dd\/yyyy\#") ") & ";"

-- 

        Ken Snell
http://www.accessmvp.com/KDSnell/



"Bob Vance" <rjvance@ihug.co.nz> wrote in message 
news:hnlqfo$h95$1@lust.ihug.co.nz...
> Ken I am getting this error
> The database engine can not find..........Thanks Bob
> "IIf(Len(tblInvoice.ClientDetail & """") = 0, IIf(Len(tblInvoice.HorseName 
> & "" & """") = 0, funGetHorseName(tblInvoice.InvoiceID, 
> tblInvoice.HorseID), " & _
> "tblInvoice.HorseName), tblInvoice.ClientDetail) AS ClientDetailField" & _
> " FROM tblInvoice WHERE" _
>
>
> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
> news:O3$k04%23wKHA.5036@TK2MSFTNGP02.phx.gbl...
>> Assuming you want that calculated field for which I gave the expression 
>> to be in the SELECT clause (watch for the mutiple, consecutive " 
>> characters):
>>
>> 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!cbClientName.value" 
>> _
>> & " AND tblInvoice.InvoiceDate>=" & _
>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") _
>> & " AND tblInvoice.InvoiceDate<=" & _
>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>> ";"
>> -- 
>>
>>        Ken Snell
>> http://www.accessmvp.com/KDSnell/
>>
>>
>>
>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>> news:hnjj85$7a0$1@lust.ihug.co.nz...
>>> Thanks Ken, my Original code for reporting Invoices for horses is below 
>>> I am trying to create a code for reporting Invoices for Clients
>>> Regards Bob
>>>
>>> Private Sub Report_Open(Cancel As Integer)
>>>
>>> Me.Caption = "Monthly Horse Invoice Report"
>>> Dim strSQL As String
>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>> & "iif(tblInvoice.HorseName=' 
>>> ',funGetHorseName(tblInvoice.InvoiceID,tblInvoice.HorseID),tblInvoice.HorseName) 
>>> AS HorseName," _
>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>> & " tblInvoice.HorseID=Forms!frmMonthlyHorseInvoice!cbHorseName.value" _
>>> & " AND tblInvoice.InvoiceDate>=" & 
>>> Format("Forms!frmMonthlyHorseInvoice!tbDateFrom.value", "mm/dd/yyyy") _
>>> & " AND tblInvoice.InvoiceDate<=" & 
>>> Format("Forms!frmMonthlyHorseInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>> ";"
>>> Report.RecordSource = strSQL
>>>
>>> End Sub
>>> -------------------------------------------------------
>>> My Code for Client reporting Invoices!
>>>
>>> Private Sub Report_Open(Cancel As Integer)
>>>
>>> Me.Caption = "Monthly Client Invoice Report"
>>> Dim strSQL As String
>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>> & " tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbClientName.value" 
>>> _
>>> & "IIf(Len(tblInvoice.ClientDetail & "") = 0, 
>>> IIf(Len(tblInvoice.HorseName & "") = 0, 
>>> funGetHorseName(tblInvoice.InvoiceID, 
>>> tblInvoice.HorseID),tblInvoice.HorseName), tblInvoice.ClientDetail)" _
>>> & " AND tblInvoice.InvoiceDate>=" & 
>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") _
>>> & " AND tblInvoice.InvoiceDate<=" & 
>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>> ";"
>>> Report.RecordSource = strSQL
>>>
>>> End Sub
>>>
>>>
>>>
>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>> news:%23OoqxT6wKHA.5340@TK2MSFTNGP04.phx.gbl...
>>>> Sorry, I am not seeing anything in the VBA code where it appears 
>>>> logical for the expression to be inserted? Could you provide more 
>>>> information? Is this expression meant to replace one of the fields 
>>>> currently in your string? Or to be a new field in the string?
>>>>
>>>> -- 
>>>>
>>>>        Ken Snell
>>>> http://www.accessmvp.com/KDSnell/
>>>>
>>>>
>>>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>>>> news:hngt2u$kns$1@lust.ihug.co.nz...
>>>>>
>>>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>>>> news:ezUnWfrwKHA.6140@TK2MSFTNGP05.phx.gbl...
>>>>>> Not sure I'm following comletely correctly, but perhaps this is what 
>>>>>> you seek:
>>>>>>
>>>>>> IIf(Len(tblInvoice.ClientDetail & "") = 0, 
>>>>>> IIf(Len(tblInvoice.HorseName & "") = 0, 
>>>>>> funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), 
>>>>>> tblInvoice.HorseName), tblInvoice.ClientDetail)
>>>>>>
>>>>>> -- 
>>>>>>
>>>>>>        Ken Snell
>>>>>> http://www.accessmvp.com/KDSnell/
>>>>>>
>>>>>>
>>>>> Thanks Ken, How do I incorerate it into this string....Regards Bob
>>>>>
>>>>> Private Sub Report_Open(Cancel As Integer)
>>>>>
>>>>> Me.Caption = "Monthly Horse Invoice Report"
>>>>>
>>>>> Dim strSQL As String
>>>>>
>>>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>>>> & " 
>>>>> tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbHorseName.value" _
>>>>> & " AND tblInvoice.InvoiceDate>=" & 
>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") 
>>>>> _
>>>>> & " AND tblInvoice.InvoiceDate<=" & 
>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>>>> ";"
>>>>> Report.RecordSource = strSQL
>>>>>
>>>>>
>>>>> End Sub
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
> 


0
Ken
3/16/2010 2:56:16 AM
Ken i am getting a error ' expect end of statement on ->  ")& "
4 of the last six symbols
Thanks bob
"Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
news:u8cwFRLxKHA.3408@TK2MSFTNGP06.phx.gbl...
> 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!cbClientName.value" _
> & " AND tblInvoice.InvoiceDate>=" & _
> Format(Forms!frmMonthlyClientInvoice!tbDateFrom.value, _
> "\#mm\/dd\/yyyy\#") _
> & " AND tblInvoice.InvoiceDate<=" & _
> Format(Forms!frmMonthlyClientInvoice!tbDateTo.value, _
> "\#mm\/dd\/yyyy\#") ") & ";"
>
> -- 
>
>        Ken Snell
> http://www.accessmvp.com/KDSnell/
>
>
>
> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
> news:hnlqfo$h95$1@lust.ihug.co.nz...
>> Ken I am getting this error
>> The database engine can not find..........Thanks Bob
>> "IIf(Len(tblInvoice.ClientDetail & """") = 0, 
>> IIf(Len(tblInvoice.HorseName & "" & """") = 0, 
>> funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), " & _
>> "tblInvoice.HorseName), tblInvoice.ClientDetail) AS ClientDetailField" & 
>> _
>> " FROM tblInvoice WHERE" _
>>
>>
>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>> news:O3$k04%23wKHA.5036@TK2MSFTNGP02.phx.gbl...
>>> Assuming you want that calculated field for which I gave the expression 
>>> to be in the SELECT clause (watch for the mutiple, consecutive " 
>>> characters):
>>>
>>> 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!cbClientName.value" 
>>> _
>>> & " AND tblInvoice.InvoiceDate>=" & _
>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") _
>>> & " AND tblInvoice.InvoiceDate<=" & _
>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>> ";"
>>> -- 
>>>
>>>        Ken Snell
>>> http://www.accessmvp.com/KDSnell/
>>>
>>>
>>>
>>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>>> news:hnjj85$7a0$1@lust.ihug.co.nz...
>>>> Thanks Ken, my Original code for reporting Invoices for horses is below 
>>>> I am trying to create a code for reporting Invoices for Clients
>>>> Regards Bob
>>>>
>>>> Private Sub Report_Open(Cancel As Integer)
>>>>
>>>> Me.Caption = "Monthly Horse Invoice Report"
>>>> Dim strSQL As String
>>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>>> & "iif(tblInvoice.HorseName=' 
>>>> ',funGetHorseName(tblInvoice.InvoiceID,tblInvoice.HorseID),tblInvoice.HorseName) 
>>>> AS HorseName," _
>>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>>> & " tblInvoice.HorseID=Forms!frmMonthlyHorseInvoice!cbHorseName.value" 
>>>> _
>>>> & " AND tblInvoice.InvoiceDate>=" & 
>>>> Format("Forms!frmMonthlyHorseInvoice!tbDateFrom.value", "mm/dd/yyyy") _
>>>> & " AND tblInvoice.InvoiceDate<=" & 
>>>> Format("Forms!frmMonthlyHorseInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>>> ";"
>>>> Report.RecordSource = strSQL
>>>>
>>>> End Sub
>>>> -------------------------------------------------------
>>>> My Code for Client reporting Invoices!
>>>>
>>>> Private Sub Report_Open(Cancel As Integer)
>>>>
>>>> Me.Caption = "Monthly Client Invoice Report"
>>>> Dim strSQL As String
>>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>>> & " 
>>>> tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbClientName.value" _
>>>> & "IIf(Len(tblInvoice.ClientDetail & "") = 0, 
>>>> IIf(Len(tblInvoice.HorseName & "") = 0, 
>>>> funGetHorseName(tblInvoice.InvoiceID, 
>>>> tblInvoice.HorseID),tblInvoice.HorseName), tblInvoice.ClientDetail)" _
>>>> & " AND tblInvoice.InvoiceDate>=" & 
>>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") 
>>>> _
>>>> & " AND tblInvoice.InvoiceDate<=" & 
>>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>>> ";"
>>>> Report.RecordSource = strSQL
>>>>
>>>> End Sub
>>>>
>>>>
>>>>
>>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>>> news:%23OoqxT6wKHA.5340@TK2MSFTNGP04.phx.gbl...
>>>>> Sorry, I am not seeing anything in the VBA code where it appears 
>>>>> logical for the expression to be inserted? Could you provide more 
>>>>> information? Is this expression meant to replace one of the fields 
>>>>> currently in your string? Or to be a new field in the string?
>>>>>
>>>>> -- 
>>>>>
>>>>>        Ken Snell
>>>>> http://www.accessmvp.com/KDSnell/
>>>>>
>>>>>
>>>>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>>>>> news:hngt2u$kns$1@lust.ihug.co.nz...
>>>>>>
>>>>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>>>>> news:ezUnWfrwKHA.6140@TK2MSFTNGP05.phx.gbl...
>>>>>>> Not sure I'm following comletely correctly, but perhaps this is what 
>>>>>>> you seek:
>>>>>>>
>>>>>>> IIf(Len(tblInvoice.ClientDetail & "") = 0, 
>>>>>>> IIf(Len(tblInvoice.HorseName & "") = 0, 
>>>>>>> funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), 
>>>>>>> tblInvoice.HorseName), tblInvoice.ClientDetail)
>>>>>>>
>>>>>>> -- 
>>>>>>>
>>>>>>>        Ken Snell
>>>>>>> http://www.accessmvp.com/KDSnell/
>>>>>>>
>>>>>>>
>>>>>> Thanks Ken, How do I incorerate it into this string....Regards Bob
>>>>>>
>>>>>> Private Sub Report_Open(Cancel As Integer)
>>>>>>
>>>>>> Me.Caption = "Monthly Horse Invoice Report"
>>>>>>
>>>>>> Dim strSQL As String
>>>>>>
>>>>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>>>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>>>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>>>>> & " 
>>>>>> tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbHorseName.value" _
>>>>>> & " AND tblInvoice.InvoiceDate>=" & 
>>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", 
>>>>>> "mm/dd/yyyy") _
>>>>>> & " AND tblInvoice.InvoiceDate<=" & 
>>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") 
>>>>>> & ";"
>>>>>> Report.RecordSource = strSQL
>>>>>>
>>>>>>
>>>>>> End Sub
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
> 


0
Bob
3/16/2010 6:06:20 AM
Thanks Ken got it going now, just gatting a parameter error on ClientDetail
Will try and work it out
Regards Bob

"Bob Vance" <rjvance@ihug.co.nz> wrote in message 
news:hnn74i$bik$1@lust.ihug.co.nz...
> Ken i am getting a error ' expect end of statement on ->  ")& "
> 4 of the last six symbols
> Thanks bob
> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
> news:u8cwFRLxKHA.3408@TK2MSFTNGP06.phx.gbl...
>> 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!cbClientName.value" 
>> _
>> & " AND tblInvoice.InvoiceDate>=" & _
>> Format(Forms!frmMonthlyClientInvoice!tbDateFrom.value, _
>> "\#mm\/dd\/yyyy\#") _
>> & " AND tblInvoice.InvoiceDate<=" & _
>> Format(Forms!frmMonthlyClientInvoice!tbDateTo.value, _
>> "\#mm\/dd\/yyyy\#") ") & ";"
>>
>> -- 
>>
>>        Ken Snell
>> http://www.accessmvp.com/KDSnell/
>>
>>
>>
>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>> news:hnlqfo$h95$1@lust.ihug.co.nz...
>>> Ken I am getting this error
>>> The database engine can not find..........Thanks Bob
>>> "IIf(Len(tblInvoice.ClientDetail & """") = 0, 
>>> IIf(Len(tblInvoice.HorseName & "" & """") = 0, 
>>> funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), " & _
>>> "tblInvoice.HorseName), tblInvoice.ClientDetail) AS ClientDetailField" & 
>>> _
>>> " FROM tblInvoice WHERE" _
>>>
>>>
>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>> news:O3$k04%23wKHA.5036@TK2MSFTNGP02.phx.gbl...
>>>> Assuming you want that calculated field for which I gave the expression 
>>>> to be in the SELECT clause (watch for the mutiple, consecutive " 
>>>> characters):
>>>>
>>>> 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!cbClientName.value" _
>>>> & " AND tblInvoice.InvoiceDate>=" & _
>>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") 
>>>> _
>>>> & " AND tblInvoice.InvoiceDate<=" & _
>>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>>> ";"
>>>> -- 
>>>>
>>>>        Ken Snell
>>>> http://www.accessmvp.com/KDSnell/
>>>>
>>>>
>>>>
>>>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>>>> news:hnjj85$7a0$1@lust.ihug.co.nz...
>>>>> Thanks Ken, my Original code for reporting Invoices for horses is 
>>>>> below I am trying to create a code for reporting Invoices for Clients
>>>>> Regards Bob
>>>>>
>>>>> Private Sub Report_Open(Cancel As Integer)
>>>>>
>>>>> Me.Caption = "Monthly Horse Invoice Report"
>>>>> Dim strSQL As String
>>>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>>>> & "iif(tblInvoice.HorseName=' 
>>>>> ',funGetHorseName(tblInvoice.InvoiceID,tblInvoice.HorseID),tblInvoice.HorseName) 
>>>>> AS HorseName," _
>>>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>>>> & " tblInvoice.HorseID=Forms!frmMonthlyHorseInvoice!cbHorseName.value" 
>>>>> _
>>>>> & " AND tblInvoice.InvoiceDate>=" & 
>>>>> Format("Forms!frmMonthlyHorseInvoice!tbDateFrom.value", "mm/dd/yyyy") 
>>>>> _
>>>>> & " AND tblInvoice.InvoiceDate<=" & 
>>>>> Format("Forms!frmMonthlyHorseInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>>>> ";"
>>>>> Report.RecordSource = strSQL
>>>>>
>>>>> End Sub
>>>>> -------------------------------------------------------
>>>>> My Code for Client reporting Invoices!
>>>>>
>>>>> Private Sub Report_Open(Cancel As Integer)
>>>>>
>>>>> Me.Caption = "Monthly Client Invoice Report"
>>>>> Dim strSQL As String
>>>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>>>> & " 
>>>>> tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbClientName.value" _
>>>>> & "IIf(Len(tblInvoice.ClientDetail & "") = 0, 
>>>>> IIf(Len(tblInvoice.HorseName & "") = 0, 
>>>>> funGetHorseName(tblInvoice.InvoiceID, 
>>>>> tblInvoice.HorseID),tblInvoice.HorseName), tblInvoice.ClientDetail)" _
>>>>> & " AND tblInvoice.InvoiceDate>=" & 
>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") 
>>>>> _
>>>>> & " AND tblInvoice.InvoiceDate<=" & 
>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>>>> ";"
>>>>> Report.RecordSource = strSQL
>>>>>
>>>>> End Sub
>>>>>
>>>>>
>>>>>
>>>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>>>> news:%23OoqxT6wKHA.5340@TK2MSFTNGP04.phx.gbl...
>>>>>> Sorry, I am not seeing anything in the VBA code where it appears 
>>>>>> logical for the expression to be inserted? Could you provide more 
>>>>>> information? Is this expression meant to replace one of the fields 
>>>>>> currently in your string? Or to be a new field in the string?
>>>>>>
>>>>>> -- 
>>>>>>
>>>>>>        Ken Snell
>>>>>> http://www.accessmvp.com/KDSnell/
>>>>>>
>>>>>>
>>>>>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>>>>>> news:hngt2u$kns$1@lust.ihug.co.nz...
>>>>>>>
>>>>>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>>>>>> news:ezUnWfrwKHA.6140@TK2MSFTNGP05.phx.gbl...
>>>>>>>> Not sure I'm following comletely correctly, but perhaps this is 
>>>>>>>> what you seek:
>>>>>>>>
>>>>>>>> IIf(Len(tblInvoice.ClientDetail & "") = 0, 
>>>>>>>> IIf(Len(tblInvoice.HorseName & "") = 0, 
>>>>>>>> funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), 
>>>>>>>> tblInvoice.HorseName), tblInvoice.ClientDetail)
>>>>>>>>
>>>>>>>> -- 
>>>>>>>>
>>>>>>>>        Ken Snell
>>>>>>>> http://www.accessmvp.com/KDSnell/
>>>>>>>>
>>>>>>>>
>>>>>>> Thanks Ken, How do I incorerate it into this string....Regards Bob
>>>>>>>
>>>>>>> Private Sub Report_Open(Cancel As Integer)
>>>>>>>
>>>>>>> Me.Caption = "Monthly Horse Invoice Report"
>>>>>>>
>>>>>>> Dim strSQL As String
>>>>>>>
>>>>>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>>>>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>>>>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>>>>>> & " 
>>>>>>> tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbHorseName.value" 
>>>>>>> _
>>>>>>> & " AND tblInvoice.InvoiceDate>=" & 
>>>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", 
>>>>>>> "mm/dd/yyyy") _
>>>>>>> & " AND tblInvoice.InvoiceDate<=" & 
>>>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") 
>>>>>>> & ";"
>>>>>>> Report.RecordSource = strSQL
>>>>>>>
>>>>>>>
>>>>>>> End Sub
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
> 


0
Bob
3/16/2010 6:17:21 AM
Got it :)
changed AS ClientDetailField" to  AS ClientDetail"
Brilliant thanks Bob

"Bob Vance" <rjvance@ihug.co.nz> wrote in message 
news:hnn7p7$btt$1@lust.ihug.co.nz...
> Thanks Ken got it going now, just gatting a parameter error on 
> ClientDetail
> Will try and work it out
> Regards Bob
>
> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
> news:hnn74i$bik$1@lust.ihug.co.nz...
>> Ken i am getting a error ' expect end of statement on ->  ")& "
>> 4 of the last six symbols
>> Thanks bob
>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>> news:u8cwFRLxKHA.3408@TK2MSFTNGP06.phx.gbl...
>>> 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!cbClientName.value" 
>>> _
>>> & " AND tblInvoice.InvoiceDate>=" & _
>>> Format(Forms!frmMonthlyClientInvoice!tbDateFrom.value, _
>>> "\#mm\/dd\/yyyy\#") _
>>> & " AND tblInvoice.InvoiceDate<=" & _
>>> Format(Forms!frmMonthlyClientInvoice!tbDateTo.value, _
>>> "\#mm\/dd\/yyyy\#") ") & ";"
>>>
>>> -- 
>>>
>>>        Ken Snell
>>> http://www.accessmvp.com/KDSnell/
>>>
>>>
>>>
>>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>>> news:hnlqfo$h95$1@lust.ihug.co.nz...
>>>> Ken I am getting this error
>>>> The database engine can not find..........Thanks Bob
>>>> "IIf(Len(tblInvoice.ClientDetail & """") = 0, 
>>>> IIf(Len(tblInvoice.HorseName & "" & """") = 0, 
>>>> funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), " & _
>>>> "tblInvoice.HorseName), tblInvoice.ClientDetail) AS ClientDetailField" 
>>>> & _
>>>> " FROM tblInvoice WHERE" _
>>>>
>>>>
>>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>>> news:O3$k04%23wKHA.5036@TK2MSFTNGP02.phx.gbl...
>>>>> Assuming you want that calculated field for which I gave the 
>>>>> expression to be in the SELECT clause (watch for the mutiple, 
>>>>> consecutive " characters):
>>>>>
>>>>> 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!cbClientName.value" _
>>>>> & " AND tblInvoice.InvoiceDate>=" & _
>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", "mm/dd/yyyy") 
>>>>> _
>>>>> & " AND tblInvoice.InvoiceDate<=" & _
>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>>>> ";"
>>>>> -- 
>>>>>
>>>>>        Ken Snell
>>>>> http://www.accessmvp.com/KDSnell/
>>>>>
>>>>>
>>>>>
>>>>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>>>>> news:hnjj85$7a0$1@lust.ihug.co.nz...
>>>>>> Thanks Ken, my Original code for reporting Invoices for horses is 
>>>>>> below I am trying to create a code for reporting Invoices for Clients
>>>>>> Regards Bob
>>>>>>
>>>>>> Private Sub Report_Open(Cancel As Integer)
>>>>>>
>>>>>> Me.Caption = "Monthly Horse Invoice Report"
>>>>>> Dim strSQL As String
>>>>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>>>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>>>>> & "iif(tblInvoice.HorseName=' 
>>>>>> ',funGetHorseName(tblInvoice.InvoiceID,tblInvoice.HorseID),tblInvoice.HorseName) 
>>>>>> AS HorseName," _
>>>>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>>>>> & " 
>>>>>> tblInvoice.HorseID=Forms!frmMonthlyHorseInvoice!cbHorseName.value" _
>>>>>> & " AND tblInvoice.InvoiceDate>=" & 
>>>>>> Format("Forms!frmMonthlyHorseInvoice!tbDateFrom.value", "mm/dd/yyyy") 
>>>>>> _
>>>>>> & " AND tblInvoice.InvoiceDate<=" & 
>>>>>> Format("Forms!frmMonthlyHorseInvoice!tbDateTo.value", "mm/dd/yyyy") & 
>>>>>> ";"
>>>>>> Report.RecordSource = strSQL
>>>>>>
>>>>>> End Sub
>>>>>> -------------------------------------------------------
>>>>>> My Code for Client reporting Invoices!
>>>>>>
>>>>>> Private Sub Report_Open(Cancel As Integer)
>>>>>>
>>>>>> Me.Caption = "Monthly Client Invoice Report"
>>>>>> Dim strSQL As String
>>>>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>>>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>>>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>>>>> & " 
>>>>>> tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbClientName.value" 
>>>>>> _
>>>>>> & "IIf(Len(tblInvoice.ClientDetail & "") = 0, 
>>>>>> IIf(Len(tblInvoice.HorseName & "") = 0, 
>>>>>> funGetHorseName(tblInvoice.InvoiceID, 
>>>>>> tblInvoice.HorseID),tblInvoice.HorseName), tblInvoice.ClientDetail)" 
>>>>>> _
>>>>>> & " AND tblInvoice.InvoiceDate>=" & 
>>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", 
>>>>>> "mm/dd/yyyy") _
>>>>>> & " AND tblInvoice.InvoiceDate<=" & 
>>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", "mm/dd/yyyy") 
>>>>>> & ";"
>>>>>> Report.RecordSource = strSQL
>>>>>>
>>>>>> End Sub
>>>>>>
>>>>>>
>>>>>>
>>>>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>>>>> news:%23OoqxT6wKHA.5340@TK2MSFTNGP04.phx.gbl...
>>>>>>> Sorry, I am not seeing anything in the VBA code where it appears 
>>>>>>> logical for the expression to be inserted? Could you provide more 
>>>>>>> information? Is this expression meant to replace one of the fields 
>>>>>>> currently in your string? Or to be a new field in the string?
>>>>>>>
>>>>>>> -- 
>>>>>>>
>>>>>>>        Ken Snell
>>>>>>> http://www.accessmvp.com/KDSnell/
>>>>>>>
>>>>>>>
>>>>>>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>>>>>>> news:hngt2u$kns$1@lust.ihug.co.nz...
>>>>>>>>
>>>>>>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>>>>>>> news:ezUnWfrwKHA.6140@TK2MSFTNGP05.phx.gbl...
>>>>>>>>> Not sure I'm following comletely correctly, but perhaps this is 
>>>>>>>>> what you seek:
>>>>>>>>>
>>>>>>>>> IIf(Len(tblInvoice.ClientDetail & "") = 0, 
>>>>>>>>> IIf(Len(tblInvoice.HorseName & "") = 0, 
>>>>>>>>> funGetHorseName(tblInvoice.InvoiceID, tblInvoice.HorseID), 
>>>>>>>>> tblInvoice.HorseName), tblInvoice.ClientDetail)
>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>>>
>>>>>>>>>        Ken Snell
>>>>>>>>> http://www.accessmvp.com/KDSnell/
>>>>>>>>>
>>>>>>>>>
>>>>>>>> Thanks Ken, How do I incorerate it into this string....Regards Bob
>>>>>>>>
>>>>>>>> Private Sub Report_Open(Cancel As Integer)
>>>>>>>>
>>>>>>>> Me.Caption = "Monthly Horse Invoice Report"
>>>>>>>>
>>>>>>>> Dim strSQL As String
>>>>>>>>
>>>>>>>> strSQL = "SELECT tblInvoice.InvoiceDate, tblInvoice.InvoiceNo," _
>>>>>>>> & "tblInvoice.OwnerName, tblInvoice.TotalAmount," _
>>>>>>>> & "tblInvoice.OwnerPercentAmount FROM tblInvoice WHERE" _
>>>>>>>> & " 
>>>>>>>> tblInvoice.OwnerID=Forms!frmMonthlyClientInvoice!cbHorseName.value" 
>>>>>>>> _
>>>>>>>> & " AND tblInvoice.InvoiceDate>=" & 
>>>>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateFrom.value", 
>>>>>>>> "mm/dd/yyyy") _
>>>>>>>> & " AND tblInvoice.InvoiceDate<=" & 
>>>>>>>> Format("Forms!frmMonthlyClientInvoice!tbDateTo.value", 
>>>>>>>> "mm/dd/yyyy") & ";"
>>>>>>>> Report.RecordSource = strSQL
>>>>>>>>
>>>>>>>>
>>>>>>>> End Sub
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
> 


0
Bob
3/16/2010 7:34:18 AM
You're welcome. Glad you were able to "fix" those last few items!
-- 

        Ken Snell
http://www.accessmvp.com/KDSnell/


"Bob Vance" <rjvance@ihug.co.nz> wrote in message 
news:hnnc9g$ejr$1@lust.ihug.co.nz...
> Got it :)
> changed AS ClientDetailField" to  AS ClientDetail"
> Brilliant thanks Bob
>
> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
> news:hnn7p7$btt$1@lust.ihug.co.nz...
>> Thanks Ken got it going now, just gatting a parameter error on 
>> ClientDetail
>> Will try and work it out
>> Regards Bob
>>
>> "Bob Vance" <rjvance@ihug.co.nz> wrote in message 
>> news:hnn74i$bik$1@lust.ihug.co.nz...
>>> Ken i am getting a error ' expect end of statement on ->  ")& "
>>> 4 of the last six symbols
>>> Thanks bob
>>> "Ken Snell" <kthsneisllis9@ncoomcastt.renaetl> wrote in message 
>>> news:u8cwFRLxKHA.3408@TK2MSFTNGP06.phx.gbl...
>>>> 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!cbClientName.value" _
>>>> & " AND tblInvoice.InvoiceDate>=" & _
>>>> Format(Forms!frmMonthlyClientInvoice!tbDateFrom.value, _
>>>> "\#mm\/dd\/yyyy\#") _
>>>> & " AND tblInvoice.InvoiceDate<=" & _
>>>> Format(Forms!frmMonthlyClientInvoice!tbDateTo.value, _
>>>> "\#mm\/dd\/yyyy\#") ") & ";"
>>>>
>>>> -- 
>>>>
>>>>        Ken Snell
>>>> http://www.accessmvp.com/KDSnell/
>>>> 


0
Ken
3/17/2010 1:33:18 AM
Reply:

Similar Artilces:

wrong email address sends
How do I make Outlook send the correct email address and not a business account that I do not want going out with my messages I'm not sure if I understand your question correctly -- are you asking how to force Outlook to send messages through one account rather than another? If so, I need some more information from you before I can answer: What version of Outlook are you using, and if 98 or 2000, what mail support mode? If you're not sure, look at the second line of Help | About Microsoft Outlook -- it should say "Internet Mail Only" or "Corporate/Workgroup". ...

Canadian payroll deductions/benefits Maximum's amount
There is a maximum (annual, week...) that we can enter in the setup of a Deduction or benefit paycode. When we 'auto select' the paycode in the batch calculation, this maximum is considere and then the amount include in the pay gets adjusted depending of the maximum allow. If we enter manually the paycode in the quick entry, there is no validation of the maximum allow (at the entry or calculation). It would be helpfull to include the validation of this maximum even if the paycode is manually add to the pay. At least a message saying that the maximum is reach would indicate t...

Emails shown with wrong date in overview-screen?
hello NG, i have the following problem: i have made a constellation of folders in witch i sort my incoming and outgoing mail to. now i have found the following phaenomenon: in one of these folders i see a bunch of mail (sent by myself) witch all seem to be sent on the same date, 15. december 2004. but in reality this is the wrong date, they have been sent over a long period reaching back even until 2001. if i doubleklick on the mail and view it the correct date is shown. only in the "overview-screen" where all the mails are listed, the date is shown wrong. what can i do about ...

What wrong with sumproduct function?
I would like to sum all numbers, which match following conditions, =SUMPRODUCT(($B$1816:$B$2400=$A2402),(C$1816:C$2400<0),(C$1816:C$2400)) press ctrl + shift + enter but it returns zero, and I have checked it, zero should not be the result. Does anyone have any suggestions what wrong with sumproduct function? Thanks in advance for any suggestions Eric 1. Sumproduct is not an array function. Use Enter, not Ctrl-Shift-Enter. 2. You must convert false/trues to numbers. One way: =SUMPRODUCT(($B$1816:$B$2400=$A2402)*(C$1816:C$2400<0)*(C$1816:C$2400)) Regards, Fred "E...

Wrong Date/Wrong amount
In the Money 2004 check register it reports the last download date as well as the balance in the top left corner. The only problem is that it is totally wrong. It reports some bogus amount with a "downloaded" date of 10/9/2003. It is quite stubborn as nothing seems to affect it. Does anyone have any idea of how to correct this? Dirty Harry Harry Calahan wrote: > *In the Money 2004 check register it reports the last download dat > as > well as the balance in the top left corner. The only problem i > that > it is totally wrong. It reports some bogus amount wi...

Help please
I screwed something up and need help big-time. Somehow the default position of the cursor when I start a new document - or Outlook mail message - is in the right center part of the page. In fact, if I even open a document, it's formatted with everything scrunched over to the right. I can backspace and get the cursor to the right and it's not a big problem on documents with simple formatting, but for some complex documents, simply backspacing makes the formatting even worse. HELP PLEASW. -- rpbilleaud For a start, see http://word.mvps.org/FAQs/AppErrors/BlankDo...

What's going wrong in Outlook 2003?
Hello, When I installed the new Office 2003, I had no problems with Outlook 2003. I received and send mails whenever I want. A few days later, I get a message from outlook that Outlook could not make a connection with the server of my provider to get my mail on my computerb (I didn't change any settings!). I checked all my settings and there are good (I checked the mailserversettings, ports, etc) but the result is still the same: Outlook cannot make a connection with the mailserver. After that, I called my provider to ask them what to do. They told me that I must remove all the ...

What Am I Doing Wrong?
The application I'm modifying is a fairly standard example of an MFC MDI app. There are several CToolBars created in MainFrm.cpp. The code to respond to the buttons on these toolbars is in the View.cpp file. One of these toolbars I modified to contain a slider. I derived a new class, CViewToolBar, from CToolBar and modified it to have a slider. I'm having problems with two major things: the correct way to include the new class information so that MainFrm knows about it to create the new toolbar, and how to get the view to respond to WM_HSCROLL messages from the slider. I had ...

wrong number in cell
In XP PRO & Excel 2002 I have a cell formated as General and unlocked. I try to enter a number { 08607100 } I hit enter and it changes to { 8607100 } no matter what I try it. This is another example of a problem in a cell I enter { 03E2 } hit enter and it changes to { 3.00E+02 }. Is there some bug in certain cells or with excel 2002 or is there some setting I am missing? Help -- Thanks MK pipco wrote: > In XP PRO & Excel 2002 I have a cell formated as General and unlocked. I > try to enter a number { 08607100 } I hit enter and it changes to { 8607100 &g...

Recurring split bills download wrong!
Money 2004: I have recurring bills with estimated amounts and splits. When I change the amount/splits and submit for payment, the check is being handled just fine through MSN Bill Pay. When I download the consummated transaction from Wells Fargo, however, Money is pulling in my ESTIMATED splits instead of my ACTUAL splits for that payment. Hence the splits never match the actual payment amount, and I get a warning. What a pain. This problem started when I switched from Wells Fargo bill pay to MSN. As I see it, though, it's Money's job to keep track of the splits internally, t...

Contact data is in wrong field
Hi all - I need some help with a complicated problem. I am working on a PST file that was recovered from some old data. Unfortunately, the recovery put contact data in the wrong places. Here are a few examples: 1. Contact street address and city shows up in the "Follup up flag" field 2. Contact "Email display as" contains the display as information with the email address, but the email address field is empty 3. Many duplicates of data with slightly different information (Same contact might have 3 copies, one with a missing telephone number, another with a missing emai...

Time wrong in meeting requests
We have Exchange 2000 and the following issue. When some (not all) users send a meeting request they are, in effect, one hour behind other Exchange users. For example User A sends a meeting request for 1pm - 2pm to User B. For User B the meeting shows up as 2pm - 3pm. Inversely, if User B sends a meeting request to User A for 4pm - 5pm it shows up as 3pm - 4pm for User A This starting happening on Friday (before daylight savings time for the first user to report it). The time is correct on the systems in question. The time is correct on the Exchange Server I don't have a clue so any cons...

transactions to read (wrong #)
I have two accounts (one is my bill pay account) that are reporting transactions to read even though all the transactions are accepted. Any ideas? -- Mike In microsoft.public.money, Mike Brearley wrote: >I have two accounts (one is my bill pay account) that are reporting >transactions to read even though all the transactions are accepted. Any >ideas? Close Money In Internet Explorer delete your browser temporary files with Tools->InternetOptions->DeleteFiles. Then open Money with Start->Run and entering "msmoney -s" without the quotes into the box....

Inventory is wrong, purchase receipts is wrong
Item A in the Inquiry > Inventory > Item Transaction for Site A yields the following: Receipt 12/11/2003 Qty 12 Variance 17/7/2004 Qty (12) Receipt 1/9/2004 Qty 8 Receipt 1/9/2004 Qty 3 Receipt 1/22/2004 Qty 5 Receipt 1/22/2004 Qty 6 Adj 1/22/2004 Qty(1) Adj 1/22/2004 Qty(2) Tranfer 1/23/04 Qty 1 According to this, I would have a total of 20. However, the Transfer on 1/23/2004 is transferring FROM Site A TO Site B. Why is this not a negative? As well, this does not show in the purchase receipts. At the very end, if I add up the quantities from this r...

Formula to calculate overtime into amount paid
I have a report based on a query that uses the following calculation in a text box to calculate the total amount paid to an employee: =([On Std Hours]+[Off Std Hours])*[Employee Data_Rate] I would like to expand this formula to somehow multiply hours that are equal to or less than 40 by the Employee Data_Rate. Then I would also like it to take anything over 40 and multiply it by 1.5*Employee Data_Rate. These two numbers should then be combined for the total amount paid to an employee including overtime. Can this be done inside my report using a formula in a text box? I'm fairly...

wrong calculations in money 2004
how much is 5000 (shares) x 13 (dollars per share)? money 2004 says it is 650. it should be 65000. i tried deleting and entering the portfolio entry 3 times but got the same wrong result, it wants to charge most of it to commision which it isnt and i didnt enter it as such. no typing errors either. i tried rebooting the program and the pc. nope! You entered 13 cents instead of dollars. Norm anonymous@discussions.microsoft.com wrote: > how much is 5000 (shares) x 13 (dollars per share)? > money 2004 says it is 650. it should be 65000. > > i tried deleting and enteri...

Calander is Wrong
My outlook 2003 has Feb 11 2008 as Friday and today Monday is Feb 11 2008. How can I fix this? --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 080210-0, 02/10/2008 Tested on: 2/11/2008 6:15:06 PM avast! - copyright (c) 1988-2008 ALWIL Software. http://www.avast.com What addins do you have installed? Is it this way in every view? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: dailytips...

wrong addresses
whenever I try to enter an address into the send to column, I get an incorrect address e.g. old address or someone whom I have never even entered into the address book. I am using the feature where you type in the first letter and outlook finishes the address for you. When I check in my address book some of these names are not even in there. Help! "PatK" <vegaspatk@cox.net> wrote in message news:equIKiRBIHA.4160@TK2MSFTNGP06.phx.gbl... > whenever I try to enter an address into the send to column, I get an > incorrect address e.g. old address or someone whom I ha...

Return Calculations in Portfolio Mgr. has wrong historical data
One of my funds (FADIX) in the Return Calculations view shows shows significantly incorrect prices for the end of 2006 and beginning of 2007 that is skewing the YTD, 1 year, and 3 year return percentages. How do I get the correct pricing info to register? I would have thought that every time Money 2007 updated, it would have captured the correct historical pricing - but obviously I am wrong. Any ideas? ...

multicurrency revaluation amounts Error
Hi all, i try to open trx-->sales-->Apply Sales Document screen and it raise very strange error "You cannot open this window; another user is posting multicurrency revaluation amounts for the sales series, try agian later" Please support ?what this mean and how to reslove it? thank you Are you using/licensed for Multicurrency? Has this screen worked before and stopped working? Richard L. Whaley Author / Consultant http://www.AccoladePublications.com Documentation for Software Users "Lotus" wrote: > Hi all, > > i try to open trx-->sales--...

How do I find the amount of hours between times?
I am creating a costed roster spread sheet. I would like to be able to calculate amount of hours between entered times and result be displayed in decimal number format i.e. In: 8:00am Out: 2:30pm Result: 6.5 Or........ In: 8:00 Out: 14:30 Result: 6.5 Is this possible in excel? If so how? Thanks Jim Gorman Hi Jim Sure. With start time in A1 and end time in B1: =(B1-A1+(B1<A1))*24 Format the result cell as decimal number. HTH. best wishes Harald "gormanj" <gormanj@discussions.microsoft.com> skrev i melding news:A0EB2B4F-978B-4536-8AF4-41DD20177EBA@microsoft.com... > ...

Sum function changes arguments
A client's spreadsheet shows a sum function which calculates individual cells for instance =sum(B2,B4,B6,B8) then saves and closes the workbook. When she reopens it, the sum reads =sum(B2:B8). She couldn't duplicate the error whilst I was there but is adamant that nobody edits the workbook. The calculation mode is automatic and version 2007 Is this really possible??? Regards Diane Doesn't sound like it, and if she couldn't reproduce it, then it seems even less likely (how many times have I said that and been wrong :-(). HTH Bob "Dianeg&quo...

count amount of cells
Hi, How to count cells that contains formulas but only the ones tha returns a value? I thought I could use function "counta", but that function counts al cells, probably becouse all cells containing formulas. Any ideas? //Thoma -- Jonsso ----------------------------------------------------------------------- Jonsson's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=547 View this thread: http://www.excelforum.com/showthread.php?threadid=27661 Hi hope you don't think this is a silly question but what do the cells containing formulas return if n...

What am I doing wrong?
The following pops up a msgbox "OK Bridge; Then it pops up a msgbox "QSRules is null" Trying to use qsRules results in an 'object required" error. What am I doing wrong? Thanks Galen <script type="text/vbscript" language="vbscript"> If Not qsBridge Is Nothing Then msgBox("OK Bridge") end if Dim QSRules Set QSRules = qsBridge.RequestQSRules() if QSRules is nothing then msgBox("QSRules is null") else msgBox("OSRules OK") end if </script> ...

Wrong account
I downloaded a bank statemnt into the wrong "Money" account. I then deleted the downloaded info and tried to download again, "Money" didn't give me the option of selecting the proper account. Can anyone help me Thanks In microsoft.public.money, r k wrote: >I downloaded a bank statemnt into the wrong "Money" account. I then deleted >the downloaded info and tried to download again, "Money" didn't give me the >option of selecting the proper account. Can anyone help me Go to the account details of the "wrong" account. Bla...