Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Insert Default Date/Time Value into a Database Table

Posted on 2015-02-05
3
Medium Priority
?
279 Views
Last Modified: 2015-02-05
Hello Experts

I wondered if there is an easy way of inserting one Date/Time value to all of my records in a database table.  Here is a summary of the situation.  I have been assigned a Membership Directory that is in excel format.  I have already imported the data into an access database table and made some changes.  We realized that we wanted to keep track of the dates that new members joined.  Therefore, we created a date time field that we will update going forward.  The question is, can we input one date (say 01/01/2015) into all of the current records, which is approximately 5,000 strong?

Thanks...
0
Comment
Question by:idejjedi2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 40592362
yes, use an update query

Update TableName
Set [DateFieldName]=#1/1/2015#

now to automatically record date everytime a new member is added,
in the design view of the table
set the default value of the field to Date()
0
 

Author Closing Comment

by:idejjedi2
ID: 40592436
Rey - That was awesome - thank you.  As a follow up - only if easy.  If you wanted to do the same thing to a "Yes/No" data type??
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40592443
Update TableName
 Set [YesNoFieldName]=-1

-1 for true
0 for false
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question