Add a Default value to a From text Box

  • Thread starter David_Williams_PG ()
  • Start date
D

David_Williams_PG ()

Am trying to add a Default value to an unbound text box. The value appears
in the box but is not added to the properties sheet for future use!!

code is :-
...........
...........
.MoveLast
.FindFirst strname

DefName = rst.Fields("NamesRC").Value

Forms!Frm_OGI_Database!Default_Name.DefaultValue = "'" & DefName & "'"

Any help much appreciated,
dw
 
S

Stuart McCall

David_Williams_PG () said:
Am trying to add a Default value to an unbound text box. The value
appears
in the box but is not added to the properties sheet for future use!!

code is :-
...........
...........
.MoveLast
.FindFirst strname

DefName = rst.Fields("NamesRC").Value

Forms!Frm_OGI_Database!Default_Name.DefaultValue = "'" & DefName & "'"

Any help much appreciated,
dw

No properties set at run-time will persist unless the form is open in design
view. The code is pretty trivial, so why not run it whenever you need to?
 
Top