View Full Version : Txt box default not blank


arage
12-31-2000, 02:48 PM
Txt box default not blank
Hi,
My user form has a text box control that shows the concatenation of 2 fields on the form (the concatenation is a reference #)

The control source is like this =FIELD1 &”-“& FIELD2

Problem is that that a new, BLANK, record shows a dash “-“ in this field (obviously) by itself.

Is there a way that ONLY a BLANK record shud show a BLANK in the reference field & that when the user starts entering stuff into the form then a “-“ shud appear in the control? Hope I make sense to anyone reading this.
Thanks!

R. Hicks
12-31-2000, 03:08 PM
Try using the following as a control source of the txtbox:

=IIf(IsNull([txtBox1]) And IsNull([txtBox2]),Null,[txtBox1] & "-" & [txtBox2])

Change "txtBox1" and "txtBox2" to the names of your objects.

HTH
RDH

[This message has been edited by R. Hicks (edited 12-31-2000).]

arage
12-31-2000, 06:01 PM
thank you!

R. Hicks
12-31-2000, 06:12 PM
You are very welcome.

Happy New Year to all,
RDH