Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF statement query

Status
Not open for further replies.

gojohnnygogogogo

Programmer
May 22, 2002
161
GB
hello, can anybody see why this just brings back a blank screen ? :

=IIf([CountofSheetID]>0,[CountofSheetID] & " records added.","no records to add")

 
Sorry I can't resist this. I don't know the answer to your question but 'You're my wife now Dave'. Anyone who is a League of Gentlemen fan really deserves to get their question answered! Learn something new every day *:->*
 
Hi!

In what situation is this IIf being used? What do you mean that it brings back a blank screen?

Jeff Bridgham
bridgham@purdue.edu
 
Sorry to interupt, do you know the standard SQL equivalent to IIf?

Thanks and apologies again
 
hi Jeff,
I am using this IIF statement in a textbox on a form.
I run the query to insert records, then the form opened after that is based on a query to show the records with date = now().
If records are added, then the form works , displaying the number of records added, but if no records are added the form is just blank.

and by the way this is gojohnny go go go go, not flabber wassa tidgevadge !
 
Have you tried something like:

strMsg = IIf(etc...)
MsgBox(strMsg)

Shin
 
Does this work:

=IIf([CountofSheetID]>0,Str([CountofSheetID]) & " records added.","no records to add")
T. Blom
Information analist
Shimano Europe
tbl@shimano-eu.com
 
SteveNapper: you can replace IIF with case in a SQL query. Hope it helps

SC
 
Jet SQL does not work with Case , you will have to write some VBA function to work with Case, which will be quite a good idea after all .................. T. Blom
Information analist
Shimano Europe
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top