[AccessD] Text Box Default Value

Dan Waters dwaters at usinternet.com
Wed Sep 19 16:14:40 CDT 2007


Substitute txtTextBox with the actual name of your textbox.

I don't know if it can be set with a query (just haven't tried).  

Generally, you would use the Default property if the initial value will
always be the same value.  Say, a checkbox would always be True, or a Date
field will always be today (use Date()).

If your initial value could be different each time, then you should use code
in the Load event.  That way you can trap for errors.

Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester
Sent: Wednesday, September 19, 2007 3:59 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Text Box Default Value

Ok. I am not thinking well today. I put this in the forms on load
property and get a message the macro txtTextBox cannot be found.

Now another question looking down the road. Can the default value be set
with a query.

Thanks.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: Wednesday, September 19, 2007 3:44 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Text Box Default Value

Instead of using the default value property, try this in the forms Load
event:

	txtTextBox = Min([tbl Manifold Production]![ProductionDate])

Good Luck!
Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester
Sent: Wednesday, September 19, 2007 2:53 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Text Box Default Value

I an using the following expression to set the default value of a text
box on a form. The text box displays nothing. What might I be doing
wrong? Thanks

 

=Min([tbl Manifold Production]![ProductionDate])

 

Chester Kaup

Engineering Technician

Kinder Morgan CO2 Company, LLP

Office (432) 688-3797

FAX (432) 688-3799

 

 

No trees were killed in the sending of this message. However a large
number of electrons were terribly inconvenienced.

 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com











































































































































































-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
























































































































































































More information about the AccessD mailing list