We help IT Professionals succeed at work.

Microsoft Access text box with default text

J.R. Sitman
J.R. Sitman asked
on
Is it possible to have default text in a text box.  We have a description box for our animals and we want a disclaimer in there for every animal.
Comment
Watch Question

Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
For that label would be best.

For text we can use text1.text = "some text".
J.R. SitmanIT Director

Author

Commented:
We cannot use a label, because this information is sent to Petfinder website.

Please explain  For text we can use text1.text = "some text".
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
sorry that was for .Net, for this we need to use defaultValue property.
Distinguished Expert 2017
Commented:
The best method is to set the default at the table level.  If you want to set it on the form, you can but the default will apply only to that form and not to records added via queries or DAO and ADO.
We cannot use a label, because this information is sent to Petfinder website.
I don't know what this means.  Are you saying that it is your website that is doing the data entry?  If so, then you need to use the first method I suggested which is to set the default on the field in the table.
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016
Commented:
example -  Me.yourtextboxName.DefaultValue = """Pawan"""
J.R. SitmanIT Director

Author

Commented:
Editing the table worked.  Thanks to both of you.
Distinguished Expert 2017

Commented:
FYI, I realize that there is no topic area for Jet/ACE but in reality, if "Access" is the BE for a web page, you are NOT using Access at all.  You are using either the Jet (.mdb) or ACE(.accdb) database engine.  Access is a RAD tool that is used to create applications.  It is NOT a database engine.  Access does work as the GUI to Jet and ACE and that appears to cause the confusion.  Access is the FE tool and Jet/ACE is the BE database engine.
J.R. SitmanIT Director

Author

Commented:
I have no idea what you are commenting about.  We are not using Access for our website/page.  The data in the database is transmitted via a text file to PetFinder.  They then post our animal information on their website.  

FYI, we are the Society for the prevention of cruelty to animals Los Angeles.
Distinguished Expert 2017

Commented:
We cannot use a label, because this information is sent to Petfinder website.
Apparently I misunderstood this remark.  It sounded like you were saying that you could not use a form solution because you were using a website.
J.R. SitmanIT Director

Author

Commented:
No problem