default value for a textbox

horsecow

Registered User.
Local time
Today, 21:11
Joined
Nov 28, 2002
Messages
16
hello

i have a form with one textbox in it. The record source for the form is a query. the control source for the box is one of the fields from the query. The query either returns "not instock" or nothing at all. The text box does exactly this at the moment. No problem at all.

But when it returns nothing, and the text box displays nothing (like it should do) i want it to display In Stock. I dont know how to do this. I tried writing In Stock in the default value for the field but nothing happened. I tried writing [In Stock] but i got "#Name? " returned.


Anyhelp?
Its rather urgent. I have a deadline in 5 days!


thank you very much
 
horsecow,

Use the Iif statement in your query to return either
"In Stock" or "Out Of Stock".

Wayne
 

Users who are viewing this thread

Back
Top Bottom