Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Interface Design _ Open Form With Text Box Already Filled

Posted by: mylton Sep 13 2019, 04:46 PM

Good evening everyone.
I have a form and a text field.
I would like that when opening this form this field already appeared filled with the word "test". So that saving this information was recorded in the table field.
Some way?
Thanks

Posted by: theDBguy Sep 13 2019, 06:27 PM

Hi. Have you tried setting the Default Value of the textbox?

Posted by: tina t Sep 13 2019, 09:13 PM

are there one or more other bound controls on the form? after you open the form, will you be entering data into at least one other bound control on the form?

if the answer to both questions above is Yes, then setting the control's DefaultValue, as DBguy suggested, will work fine. if the answer to either question is No, then you will need to set the value of the control either manually or programmatically, and then Save the record, in order for the value to 1) be in the control and 2) be saved to the field in the underlying table.

hth
tina

Posted by: GroverParkGeorge Sep 14 2019, 09:41 AM

Hang on. If the value "test" is ALWAYS going to be added to this field via this control, then it's probably not very useful is it?

Or can it be changed by the user to something other than "test" during data entry of a new record?

I would actually make this the Default value for this field in the table, not in the form.




Posted by: mylton Sep 16 2019, 09:06 AM

Good Morning.
I decided by inserting the text in the property "default value" of the field.

This need is for an adaptation to a specific need to have a standard form with a difference in a small ID that would be "modified" using it.
thank you all.

Posted by: theDBguy Sep 16 2019, 10:51 AM

Hi. Glad to hear you got it sorted out. Good luck with your project.