I don't know what you have so I can't say if it caused the
effect you are asking about. However, the reason I
mentioned the DefaultValue property as something to
investigate is because the string in the property is
evaluated as an expression when it is used on a new record.
The standard syntax to assign a text value to the
DefaultValue property is:
Me.somecontrol.DefaultValue = """" & x & """"
where x is some variable, control or field name. The
property will then contain "1100-100" (including the
surrounding " marks). When the default is applied to the
control on a new record, the **expression** "1100-100" will
evaluate to the text string 1100-100 (without the " marks).
I suspect that what you did was something like:
Me.somecontrol.DefaultValue = x
so the property then contains 1100-100 (without " marks).
When this default is applied, the expression 1100-100 is
evaluated and the result is 1000.
This can get even more confusing when setting the
DefaultValue to a date where # signs are also needed. And,
of course, none of this confusion arises when setting the
DefaultValue to a number, because a number as an expression
just evaluates to itself.
--
Marsh
MVP [MS Access]
I do have code that assigns a default value, because the form is based on a
query, and the inputs of the combos are used for update/append queries., so
upon opening, the combos are assinged as a default value, tehir matching
fields from the query.
Would setting the .DefaultValue cause this bevahiour? I can't imagine what
else it could be!