I am creating a wizard that enables the user to select fields for a form. One of the steps in the wizard is to set the default values for the field. The numeric fields are not a problem, but I am having difficulty with alpha fields. Here is my code:
'Set Default Values
If IsNull(rstSelectedField.Fields("DefaultValue")) Then
If Not IsNull(rstSelectedField.Fields("FieldDefaultValue")) Then
ctlControl.DefaultValue = rstSelectedField.Fields("FieldDefaultValue")
End If
Else: ctlControl.DefaultValue = rstSelectedField.Fields("DefaultValue")
End If
The problem is this: If I enter L for my default value, L is saved in the selected fields table in the FieldDefaultValue. This value is then entered into the default value property of the control on the form What I need it to do is enter "L" in place of L. How do I get the quotation marks around the value?
Thanks
Scott
'Set Default Values
If IsNull(rstSelectedField.Fields("DefaultValue")) Then
If Not IsNull(rstSelectedField.Fields("FieldDefaultValue")) Then
ctlControl.DefaultValue = rstSelectedField.Fields("FieldDefaultValue")
End If
Else: ctlControl.DefaultValue = rstSelectedField.Fields("DefaultValue")
End If
The problem is this: If I enter L for my default value, L is saved in the selected fields table in the FieldDefaultValue. This value is then entered into the default value property of the control on the form What I need it to do is enter "L" in place of L. How do I get the quotation marks around the value?
Thanks
Scott