How to write a Default Value in VBA?

michalgut25

Registered User.
Local time
Today, 13:35
Joined
Jan 28, 2013
Messages
15
e.g. I want to set "10" as a default value in to my unbound subform (in column).
How should I write line a code for that?
 
You don't need code to do that.

With your form in design view, go to the Data tab of the properties window, click on the text box, and enter 10 in the Default Value field;

attachment.php
 

Attachments

  • Capture.JPG
    Capture.JPG
    47.8 KB · Views: 325
Thx John, I know about this function in properties, but I think I gave bad example. I have unbound form with unbound subform. See attached Image. Value from field number (form) should be default value in column (subform). VBA Code could be placed in number field (form) after actualization.
 

Attachments

  • 1.jpg
    1.jpg
    27.5 KB · Views: 87
You might also find this link useful for formulating the correct syntax for referencing subforms, their controls and their properties.

It's a handy link to bookmark ;)
 

Users who are viewing this thread

Back
Top Bottom