By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,107 Members | 1,318 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,107 IT Pros & Developers. It's quick & easy.

Is there a way to display alternate text in a text box if field is empty

P: n/a
The Results Form I am working on has a field for price. Some of the
records do not have price
at this time.

Is there a way to program the text box to read, "Contact Whoever for
details" if
the field price is left blank.

Or will I just have to put that message in the price field in the
table for every record that I don't want to put the price in right
now.
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You "could" just set the default value for the text box to that value, and
if the users don't know the price, then that value will be saved with the
record. If they do know it, they can simply erase the default value and type
over it.

Or:

You could use the Form's BeforeUpdate event:

If Me!<yourControlName> = "" or IsNull(Me!<yourControlName>) Then
Me!<yourControlName> = "Whatever value you want here"
End If

--
James Lankford
"Kenneth Grice" <ke**********@yahoo.com> wrote in message
news:e2**************************@posting.google.c om...
The Results Form I am working on has a field for price. Some of the
records do not have price
at this time.

Is there a way to program the text box to read, "Contact Whoever for
details" if
the field price is left blank.

Or will I just have to put that message in the price field in the
table for every record that I don't want to put the price in right
now.

Nov 12 '05 #2

P: n/a
On 27 Oct 2003 18:49:25 -0800, ke**********@yahoo.com (Kenneth Grice)
wrote:

You don't want to do your last suggestion, because your Price field
should be Currency.

If the message is different for different situations:
Contact Jim for details
Contact Mary for details
then I would suggest a new field NoPriceNotes.

If message always the same, you can put it somewhere on the form,
perhaps even in the statusbar.

-Tom.
The Results Form I am working on has a field for price. Some of the
records do not have price
at this time.

Is there a way to program the text box to read, "Contact Whoever for
details" if
the field price is left blank.

Or will I just have to put that message in the price field in the
table for every record that I don't want to put the price in right
now.


Nov 12 '05 #3

P: n/a
If you are viewing a single form at a time.

Try using a unbound text control with its default value set to your message,
then with the form's on current event you could fill-in the control with the
current price if set. You would then use the after update event of the
control to fill-in the price field after the user enters a value.

"Kenneth Grice" <ke**********@yahoo.com> wrote in message
news:e2**************************@posting.google.c om...
The Results Form I am working on has a field for price. Some of the
records do not have price
at this time.

Is there a way to program the text box to read, "Contact Whoever for
details" if
the field price is left blank.

Or will I just have to put that message in the price field in the
table for every record that I don't want to put the price in right
now.

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.