1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access - Field

Discussion in 'Business Applications' started by Gemuine, Nov 7, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. Gemuine

    Gemuine Thread Starter

    Joined:
    Aug 16, 2007
    Messages:
    89
    Hello:

    I have a database with a field called "Date". But on that field, I just want an automatic date of 10/31/05 meaning when the user goes that field it will be automatically populated with that date. How do I do that?:confused:
     
  2. Gregor1234

    Gregor1234

    Joined:
    Jun 3, 2004
    Messages:
    237
    Will the user be filling in this field using a form?
    Do you want to allow the user to be able to enter a date besides the current date?

    The function Now() can be used to enter the current date into fields or VBA variables.

    You can have the current date populated using the current day by opening the table containing the field in design view, clicking on the date field and entering Now() into the "Default Value" field in the field properties below.

    This method does have its drawbacks however because it enters the current date and time when the new record is opened for input and not when the record is actually committed to the database.

    If you are using a form, then you can enter use VBA code in the field's click event to set the value of the field to Now()
     
  3. Gemuine

    Gemuine Thread Starter

    Joined:
    Aug 16, 2007
    Messages:
    89
    The user will not be filling in this field. I want it to be automatically populated with a set date "10-31/05". The user will how ever fill in another field which is calle date received. And yes, the user wull be using this i a form.
     
  4. slurpee55

    slurpee55

    Joined:
    Oct 20, 2004
    Messages:
    7,837
    Hi Gemmie
    The date is based on a table, isn't it? For that table go to design view, then go to that Date field. Enter the date you want in the property field "default value"
    It will enter that in all new entries automatically (but you will have to fill in the date for any older data that exists already) - you could even make it not visible or not changeable on your form.
     
  5. Gregor1234

    Gregor1234

    Joined:
    Jun 3, 2004
    Messages:
    237
    Oops! I though you wanted today's date. Slurpee55's right.. Just put the set date into the field's Dafault Value property in the table design.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/648938

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice