I've looked around the groups and don't have tried some of the various
suggestions to no avail. So I'm hoping someone can help me out here.
I have a form that, when a cmd button is clicked, changes the property
of the form to dataentry. On this form, there are two fields that
have a default value set. The one default value set using the
property sheet is getting the value from a numeric field on a
different form and is working just fine. The one not working just
fine has its default value set using vba according to the tab control
which I use to filter the records on the form and is a text field.
Both fields are bound.
When the form changes to 'dataentry' mode, the default value of the
text field set in vba gives me '#Error.' This is how I am setting the
default value (the text changes per the tab control):
Me.mycontrol.DefaultValue = "E"
I have tried
Me.mycontrol.DefaultValue = " 'E' "
as well as
Me.mycontrol.DefaultValue =" ' "E " ' "
(this gives me a 'compile error: expected: end of
statement)
Any idea why this cannot be set?
TIA,
Eric