last record as default for new

Marrick

New member
Local time
Today, 22:48
Joined
Mar 12, 2002
Messages
9
This code is very handy for setting the default value for the next record...
controlnameX.DefaultValue= """"controlnameX""""
But I have never understood why 4 sets of quotes are required on either side of the control name.
Any enlightenment on this feature much appreciated
 
I think you mean:
Code:
controlnameX.DefaultValue= """" & controlnameX & """"

Or

controlnameX.DefaultValue= """somevalue"""
So the first one is four quotes and a concatenated value from a control, while the second one is simply a text value using three quotes.

The result must be surrounded in quotes because the Default Value is strict on this, so this is how the compiler expects you write it.
 

Users who are viewing this thread

Back
Top Bottom