Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Predicate current value based on previous values

Status
Not open for further replies.

PJFry

Technical User
Feb 6, 2005
93
US
I have form in which the user track account purchases. There are four steps:
Quote
Order
Payment received
Order Shipped

There is a manatory three day rescission period that must be observed before the order can be shipped. I want to limit shipping until after the rescission period is up. Here is an example:

1/1/07 Quote Given
1/2/07 Order made
1/2/07 Payment received

Our rules state that the order cannot be shipped until 1/5/07.

How do I prevent the user from selecting 'Order Shipped' until 1/5/07.

I am using Access 2003. The values that indicate the order status are 1-5, labled as 'lngOrderStatus'

Thanks in advance!
PJ
 
Why not check the date in the Before Update event of the Order Status control?
 
How are ya PJFry . . .

This secnario is perfect for [blue]Conditional Formatting[/blue] (controlling the [purple]enabled property[/purple] of 'Order Shipped) espcially if the form is in [blue]continuous view[/blue].

The [blue]Conditional Formatting[/blue] expression would be:
Code:
[blue]Expression Is Date() >= [Order Shipped]+3[/blue]
[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
Aceman1


While I am sure conditional formatting is a useful device for highlighting the records, in what way will it prevent

"the user from selecting 'Order Shipped' until 1/5/07."?

As per the original post?

Checking the date in the Before Update event will allow the update to be reversed if the rescission period is not up.



 
Howdy [blue]Remou . . .[/blue]

[blue]Conditional Formatting[/blue] can also control the [purple]Enabled property![/purple] . . . check it out. [thumbsup2]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top