How-2 Displaying specific dates

  • Thread starter Thread starter Charles Phillips
  • Start date Start date
C

Charles Phillips

Hello,
I am working with MS-Access 97
I have a field that's called "Ship Date"
I want to display a date 10 days later than the "Ship Date" I entered.
How do I take a date and return (display) another date which is 10 days
later than the original date?


Charles L. Phillips
 
Hello,
"Thank You" for the code, but I was not very clear.
I have 2 fields, "Ship Date" and "Follow-up Date"
I manually enter the date in "Ship Date".
I want a date (+10) to be displayed in "Follow-up Date"
How do I do this?
Is there a way to automatically display a day, 10 days later in the
"Followup-Date" field???


Ken Snell said:
Date10DaysLater = DateAdd("d", 10, [Ship Date])


--
Ken Snell
<MS ACCESS MVP>

Charles Phillips said:
Hello,
I am working with MS-Access 97
I have a field that's called "Ship Date"
I want to display a date 10 days later than the "Ship Date" I entered.
How do I take a date and return (display) another date which is 10 days
later than the original date?


Charles L. Phillips
 
When you say "field", do you mean the field in a table (which is its correct
meaning)? If yes, it is never a good idea to enter data directly into
tables. Always use a form for doing this.

One reason for a form (other than it's an interface between you and the
data) is that a form has controls and events, things that you can program. A
table's fields cannot be programmed/coded in ACCESS; thus, what you want to
do can easily be done on a form; but cannot be done with a table.

On your form, put the textbox that you use to enter the starting date. Call
it txtStart. Then put a textbox next to it; name it txt10Days. In the
txt10Days control's control source property, put this expression:
=DateAdd("d", 10, [txtStart])

Then, when you type a value into txtStart, the 10-days-later value will
automatically show in the other textbox.

--
Ken Snell
<MS ACCESS MVP>

Charles Phillips said:
Hello,
"Thank You" for the code, but I was not very clear.
I have 2 fields, "Ship Date" and "Follow-up Date"
I manually enter the date in "Ship Date".
I want a date (+10) to be displayed in "Follow-up Date"
How do I do this?
Is there a way to automatically display a day, 10 days later in the
"Followup-Date" field???


Ken Snell said:
Date10DaysLater = DateAdd("d", 10, [Ship Date])


--
Ken Snell
<MS ACCESS MVP>

Charles Phillips said:
Hello,
I am working with MS-Access 97
I have a field that's called "Ship Date"
I want to display a date 10 days later than the "Ship Date" I entered.
How do I take a date and return (display) another date which is 10 days
later than the original date?


Charles L. Phillips
 
Hello,
That technique works very well, "Thank You"...
Any suggestions on "How-2" become more fimilar with writing basic code???


Ken Snell said:
When you say "field", do you mean the field in a table (which is its correct
meaning)? If yes, it is never a good idea to enter data directly into
tables. Always use a form for doing this.

One reason for a form (other than it's an interface between you and the
data) is that a form has controls and events, things that you can program. A
table's fields cannot be programmed/coded in ACCESS; thus, what you want to
do can easily be done on a form; but cannot be done with a table.

On your form, put the textbox that you use to enter the starting date. Call
it txtStart. Then put a textbox next to it; name it txt10Days. In the
txt10Days control's control source property, put this expression:
=DateAdd("d", 10, [txtStart])

Then, when you type a value into txtStart, the 10-days-later value will
automatically show in the other textbox.

--
Ken Snell
<MS ACCESS MVP>

Charles Phillips said:
Hello,
"Thank You" for the code, but I was not very clear.
I have 2 fields, "Ship Date" and "Follow-up Date"
I manually enter the date in "Ship Date".
I want a date (+10) to be displayed in "Follow-up Date"
How do I do this?
Is there a way to automatically display a day, 10 days later in the
"Followup-Date" field???


Ken Snell said:
Date10DaysLater = DateAdd("d", 10, [Ship Date])


--
Ken Snell
<MS ACCESS MVP>

Hello,
I am working with MS-Access 97
I have a field that's called "Ship Date"
I want to display a date 10 days later than the "Ship Date" I entered.
How do I take a date and return (display) another date which is 10 days
later than the original date?


Charles L. Phillips
 
There are many good books out there....

John Viescas has some listed at http://www.viescas.com/Info/books.htm


--
Ken Snell
<MS ACCESS MVP>

Charles Phillips said:
Hello,
That technique works very well, "Thank You"...
Any suggestions on "How-2" become more fimilar with writing basic code???


Ken Snell said:
When you say "field", do you mean the field in a table (which is its correct
meaning)? If yes, it is never a good idea to enter data directly into
tables. Always use a form for doing this.

One reason for a form (other than it's an interface between you and the
data) is that a form has controls and events, things that you can
program.
A
table's fields cannot be programmed/coded in ACCESS; thus, what you want to
do can easily be done on a form; but cannot be done with a table.

On your form, put the textbox that you use to enter the starting date. Call
it txtStart. Then put a textbox next to it; name it txt10Days. In the
txt10Days control's control source property, put this expression:
=DateAdd("d", 10, [txtStart])

Then, when you type a value into txtStart, the 10-days-later value will
automatically show in the other textbox.

--
Ken Snell
<MS ACCESS MVP>

Charles Phillips said:
Hello,
"Thank You" for the code, but I was not very clear.
I have 2 fields, "Ship Date" and "Follow-up Date"
I manually enter the date in "Ship Date".
I want a date (+10) to be displayed in "Follow-up Date"
How do I do this?
Is there a way to automatically display a day, 10 days later in the
"Followup-Date" field???


Date10DaysLater = DateAdd("d", 10, [Ship Date])


--
Ken Snell
<MS ACCESS MVP>

Hello,
I am working with MS-Access 97
I have a field that's called "Ship Date"
I want to display a date 10 days later than the "Ship Date" I entered.
How do I take a date and return (display) another date which is 10 days
later than the original date?


Charles L. Phillips
 
Back
Top