A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Default value on Text Box Form



 
 
Thread Tools Display Modes
  #1  
Old August 29th, 2008, 04:04 PM posted to microsoft.public.access.forms
kft10 via AccessMonster.com
external usenet poster
 
Posts: 28
Default Default value on Text Box Form

Hi All,

I tried to put todays date as a default value property on Text box form, but
it doesn't apprear when I run the form. And I tried to put it on 'Control
Source' property, it works, but I can't can edit it.

Is anybody have an idea how to make a todays date as a default on text box
form and also we can edit it? Thank you in advance.

KF

--
Message posted via http://www.accessmonster.com

  #2  
Old August 29th, 2008, 04:12 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Default value on Text Box Form

"kft10 via AccessMonster.com" wrote in message news:89662c4bac460@uwe...
Hi All,

I tried to put todays date as a default value property on Text box form,
but
it doesn't apprear when I run the form. And I tried to put it on 'Control
Source' property, it works, but I can't can edit it.

Is anybody have an idea how to make a todays date as a default on text box
form and also we can edit it? Thank you in advance.



Are you aware that the default value will only appear in a new record? Is
that where it didn't appear, or were you looking at existing records?

Setting the Default Value property to

Date()

ought to work, but it will only be applied to new records.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

  #3  
Old August 29th, 2008, 04:21 PM posted to microsoft.public.access.forms
kft10 via AccessMonster.com
external usenet poster
 
Posts: 28
Default Default value on Text Box Form

Thank you for the answer, you are right. I am trying to make a form as a
layout input to run the query based on the date on this form, so no record on
it. How can I make a default on text box on the form without any records?

KF


Dirk Goldgar wrote:
Hi All,

[quoted text clipped - 5 lines]
Is anybody have an idea how to make a todays date as a default on text box
form and also we can edit it? Thank you in advance.


Are you aware that the default value will only appear in a new record? Is
that where it didn't appear, or were you looking at existing records?

Setting the Default Value property to

Date()

ought to work, but it will only be applied to new records.


--
Message posted via http://www.accessmonster.com

  #4  
Old August 29th, 2008, 04:36 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Default value on Text Box Form

"kft10 via AccessMonster.com" wrote in message news:8966523e3fc73@uwe...
Thank you for the answer, you are right. I am trying to make a form as a
layout input to run the query based on the date on this form, so no record
on
it. How can I make a default on text box on the form without any records?



Now I'm not sure what is going on. In an *unbound* control, the default
value should appear for every record, existing or new, until you change it.
Are you saying that you have an unbound text box on an unbound form, with
the text box's Default Value property set to Date(), and yet the date
doesn't appear in that text box when you open the form?

Do you have some code running behind the form that may be changing the value
of the text box?

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

  #5  
Old August 29th, 2008, 04:57 PM posted to microsoft.public.access.forms
kft10 via AccessMonster.com
external usenet poster
 
Posts: 28
Default Default value on Text Box Form

Yes, the default value in unbound text box on the unbound form doesn't appear
when I open the form and they don't have some codes running behind the form.
This unbound form actually, just for inputing data to apply to the certain
query.

Dirk Goldgar wrote:
Thank you for the answer, you are right. I am trying to make a form as a
layout input to run the query based on the date on this form, so no record
on
it. How can I make a default on text box on the form without any records?


Now I'm not sure what is going on. In an *unbound* control, the default
value should appear for every record, existing or new, until you change it.
Are you saying that you have an unbound text box on an unbound form, with
the text box's Default Value property set to Date(), and yet the date
doesn't appear in that text box when you open the form?

Do you have some code running behind the form that may be changing the value
of the text box?


--
Message posted via http://www.accessmonster.com

  #6  
Old August 29th, 2008, 06:46 PM posted to microsoft.public.access.forms
kft10 via AccessMonster.com
external usenet poster
 
Posts: 28
Default Default value on Text Box Form

HI Dirk,

Do you have any other ide? Thx.

Rgds,
KF


Dirk Goldgar wrote:
Hi All,

[quoted text clipped - 5 lines]
Is anybody have an idea how to make a todays date as a default on text box
form and also we can edit it? Thank you in advance.


Are you aware that the default value will only appear in a new record? Is
that where it didn't appear, or were you looking at existing records?

Setting the Default Value property to

Date()

ought to work, but it will only be applied to new records.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200808/1

  #7  
Old August 29th, 2008, 07:00 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Default value on Text Box Form

Delete the textbox and re-create it. Set its Default Value Property to

Date()

It it still fails to work, go into the code window behind your form, and in
the Immediate Window enter

?Date()

then, with the cursor on that line, hit Enter

Does the current date appear?

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200808/1

  #8  
Old August 29th, 2008, 10:00 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Default value on Text Box Form

"kft10 via AccessMonster.com" u45012@uwe wrote in message
news:8966a16998e1c@uwe...
Yes, the default value in unbound text box on the unbound form doesn't
appear
when I open the form and they don't have some codes running behind the
form.
This unbound form actually, just for inputing data to apply to the certain
query.



What version of Access? If Access 2007, is VBA code enabled in this
database?

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.