How-2 Displaying specific dates

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
 
C

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

Ken Snell

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
 
C

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

Ken Snell

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
 

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