473,785 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

adding today's date to a table

I am creating a database for a video shop and in the loans table want
there to be a field for date taken, with a default value of today.
Trying to write =today() as in the help gives an error, while using
=date() adds todays date, but this changes as the date changes.
Please help.

Janet Chapman
Nov 13 '05 #1
5 8347
I have a table that does this. Fieldtype is Date/Time and in the Default
Value I have Date() (no "=" sign). Required is set to "no". This returns
today's date as the default however you can change it if you want. Maybe
I'm misunderstandin g you but wouldn't you want the date to change as the
current date changes?


"Janet Chapman" <ja*********@ho tmail.com> wrote in message
news:85******** *************** ***@posting.goo gle.com...
I am creating a database for a video shop and in the loans table want
there to be a field for date taken, with a default value of today.
Trying to write =today() as in the help gives an error, while using
=date() adds todays date, but this changes as the date changes.
Please help.

Janet Chapman

Nov 13 '05 #2

"Janet Chapman" <ja*********@ho tmail.com> wrote in message
news:85******** *************** ***@posting.goo gle.com...
I am creating a database for a video shop and in the loans table want
there to be a field for date taken, with a default value of today.
Trying to write =today() as in the help gives an error, while using
=date() adds todays date, but this changes as the date changes.
Please help.


I don't understand what you mean by "changes as the date changes" -- the
default value for a field is only used when a new record is created, and
that is what I understood that you wanted. Because it is a "default" value,
the user can overtype it in a form and the user's value will be what is
stored.

I also am not certain why you thought that Today() was an Access built-in
function. Perhaps you are thinking of some other software?

Larry Linson
Microsoft Access MVP
Nov 13 '05 #3

Thank you for your response. I wanted the date for each record to
default to the day that record was created, and not update itself to
todays date, which is what happens with Date().

Janet
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #4
gj
Janet Chapman wrote:
I am creating a database for a video shop and in the loans table want
there to be a field for date taken, with a default value of today.
Trying to write =today() as in the help gives an error, while using
=date() adds todays date, but this changes as the date changes.
Please help.

Janet Chapman

Add the field to the table.
In the table definition set the default value to DATE(). If you wnat it
to store the data and time set the default value to NOW() ensuring you
have selected GENERAL DATE as the first optiojn in the properties.

Alternately, you can set the default value in a form but my preference
for these fields is the table.

Have fun.

GJ
Nov 13 '05 #5
Abhorsen
3 New Member
i too am trying to do this but i get a compile error if i save when trying to switch out of design view. any ideas?
May 1 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
8385
by: Phil Powell | last post by:
The date field I believe is of type datetime, but I'm sorry I have absolutely no idea how to put today's date into a datetime column using ASP and SQL Server. Folks, I'm a LINUX guy!!! This is a project I have to get done today and that is about the only thing snagging it from being done before COB today. Please help.
2
1728
by: Charles Rouse | last post by:
How can I automatically add a weekly charge of $2.00 for each client in drug treatment? I have a "financial" table linked with the client table with 4 fields: clientID, date, charge, paid. Every week, clients are to pay $2.00. how can I automatically add this weekly fee for 167 clients? The form and report does the balance amount. clientID: 1234 Date charge paid balance 02/01/04 2.00 ...
2
21079
by: markryde | last post by:
Hello, I am trying to add the current date to a file name in python script like thus: import os import sys import rpm import time import datetime
5
2710
by: M Skabialka | last post by:
I am creating my first Visual Studio project, an inventory database. I have created a form and used written directions to add data from a table to the form using table adapters, data sets, etc. I imported a table from an Access database which has some date fields. Many of these dates have never been filled in, so are nulls. If I look directly into the table data from Visual Studio it shows NULL. However, when I scroll from record to...
2
1738
by: Maximus | last post by:
I need some help. I have an .asp page that interfaces with an Access table (wjs_SuperInput). The .asp page looks to the table and pulls a recordset based on a job number, 12345, and a weekending date, mm/dd/ yyyy. If there is no record for that job number with that particular weekending date a record is created, and the page refreshes, with form fields to allow the user to edit the record and then update it. Fields in the table are: ...
5
1458
by: dan | last post by:
I could find no documentation that the Date object has useful wrapping properties. For example, write(new Date(2007, 11 + 1, 1)) results in January 1st 2008. And write(new Date(2007, 0, 31 + 1)) results in February 1st 2007. I have 'JavaScript The Definitive Guide 5th Edition' and it does not mention this. All the examples I see on the WEB are laborious functions! Dan
3
2018
by: xxtokenxx | last post by:
I am writing a birthday list for a site for my school. While developing it. Currently the code for the output of birthdays is: <html><head> <title>Birthday List</title><script type="text/javascript"> var arrBday = , , , , , ,
5
4654
by: nkechifesie | last post by:
Hi, I have written a VBA program that runs on Excel and puts data on the excel sheet. This runs everyday. I want to be adding the dates to the files, this date is gotten from the excel sheet that uploads into the report excel file. Below is the Code I wrote which doesnt work, please could you help me Sheets("Matrix sheet").Select Today = Cells(1, 1) 'The location of the date on the raw sheet Today = Format(Today,...
1
4909
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the events when click on that date that perticular event displyed in a text box.But my requirement is to when click on that date that related event displyed in same td row not the text box. and also i add the events to that calendar.plz advice how to...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10148
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.