Required date

  • Thread starter samotek via AccessMonster.com
  • Start date
S

samotek via AccessMonster.com

On my form i have two fields from the table orders: order date and required
date.
I want to put in the after update event of the control orderid the following
expression
Me![required date] = Me![order date]
and to increase the order date with 10 days

Can i do it ?
 
D

Douglas J. Steele

You can, but if you're always always going to be increasing Order Date by
ten days, you probably shouldn't, as it's usually considered a bad idea to
store computed fields.

Anyhow, it would be

Me![order date] = DateAdd("d", 10, Me![order date])
 
A

Allen Browne

1. In form design view, right-click the Order Date text box, and choose
Properties.

2. Set its After Update property (Event tab of Properties box) to:
[Event Procedure]

3. Click the Build button (...) beside this.
Access opens the code window.

4. Between the "Private Sub..." and "End Sub" lines, put your line of code,
i.e.:
Me![required date] = Me![order date] + 10

This assumes that the required data should default to 10 days after the
order date, but you are happy for your user to then go and type any date
there instead.
 
S

samotek via AccessMonster.com

Thank you ! it works !
You can, but if you're always always going to be increasing Order Date by
ten days, you probably shouldn't, as it's usually considered a bad idea to
store computed fields.

Anyhow, it would be

Me![order date] = DateAdd("d", 10, Me![order date])
On my form i have two fields from the table orders: order date and
required
[quoted text clipped - 6 lines]
Can i do it ?
 
S

samotek via AccessMonster.com

Thank you ! it works !
You can, but if you're always always going to be increasing Order Date by
ten days, you probably shouldn't, as it's usually considered a bad idea to
store computed fields.

Anyhow, it would be

Me![order date] = DateAdd("d", 10, Me![order date])
On my form i have two fields from the table orders: order date and
required
[quoted text clipped - 6 lines]
Can i do it ?
 
S

samotek via AccessMonster.com

Thank you ! it works !
You can, but if you're always always going to be increasing Order Date by
ten days, you probably shouldn't, as it's usually considered a bad idea to
store computed fields.

Anyhow, it would be

Me![order date] = DateAdd("d", 10, Me![order date])
On my form i have two fields from the table orders: order date and
required
[quoted text clipped - 6 lines]
Can i do it ?
 
S

samotek via AccessMonster.com

Thank you ! it works !
You can, but if you're always always going to be increasing Order Date by
ten days, you probably shouldn't, as it's usually considered a bad idea to
store computed fields.

Anyhow, it would be

Me![order date] = DateAdd("d", 10, Me![order date])
On my form i have two fields from the table orders: order date and
required
[quoted text clipped - 6 lines]
Can i do it ?
 
S

samotek via AccessMonster.com

Thank you ! it works !
You can, but if you're always always going to be increasing Order Date by
ten days, you probably shouldn't, as it's usually considered a bad idea to
store computed fields.

Anyhow, it would be

Me![order date] = DateAdd("d", 10, Me![order date])
On my form i have two fields from the table orders: order date and
required
[quoted text clipped - 6 lines]
Can i do it ?
 
S

samotek via AccessMonster.com

Thank you ! it works !
You can, but if you're always always going to be increasing Order Date by
ten days, you probably shouldn't, as it's usually considered a bad idea to
store computed fields.

Anyhow, it would be

Me![order date] = DateAdd("d", 10, Me![order date])
On my form i have two fields from the table orders: order date and
required
[quoted text clipped - 6 lines]
Can i do it ?
 

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