Set value upon no data returned

Uvuriel03

Registered User.
Local time
Today, 07:32
Joined
Mar 19, 2008
Messages
115
I'm not even sure this is possible. I have a query that, assuming the needed data is there, finds the highest number from a list. Easy.

Here's the hard part.

I can't figure out how to set an automatic first number, just in case there isn't one already there.

I THINK I need to use an IIF() statement, but I have NO idea how to imply the lack of data within it. It would basically look like;, IIF( {no data is returned from}[insert code here],1,
Code:
)
 
Anybody have any ideas?
 
How about using a DMax() function instead of a query and if a null is returned then insert your initial value?
 
I hadn't thought about that. I shall have to test it. ^__^
 
The Dmax() in conjunction with a little bit of coding worked like a charm! I had to use IfNumeric() to avoid getting a lack of data error, but it works perfectly! Thanks for the idea! ^__^
 

Users who are viewing this thread

Back
Top Bottom