Default value on Text Box Form

  • Thread starter kft10 via AccessMonster.com
  • Start date
K

kft10 via AccessMonster.com

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
 
D

Dirk Goldgar

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.
 
K

kft10 via AccessMonster.com

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 said:
[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.
 
D

Dirk Goldgar

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?
 
K

kft10 via AccessMonster.com

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.
 
K

kft10 via AccessMonster.com

HI Dirk,

Do you have any other ide? Thx.

Rgds,
KF


Dirk said:
[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.
 
L

Linq Adams via AccessMonster.com

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?
 
D

Dirk Goldgar

kft10 via AccessMonster.com said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top