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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing order status

Status
Not open for further replies.

moretickets

Technical User
Jul 1, 2000
17
JM
Hi there,

I have a table with orders and order status which can be selected from a pull down list with choices of on hold, shipped, cancelled, returned, delivered. Once the order has been delivered I dont want anyone to have the ability to change the status to anything. How can this be done?

Thanks
[sig][/sig]
 
I would create a field, Updatable, datatype Yes/No, in the table, that is updated to No when the order status is set to delivered.

When a user tries to change order status, check this field. Do this in the BeforeUpdate event of the order status field. If the Updatable field is No, then display a message box telling them that they can't change it and cancel the update.

Let me know if you need more detail. If you want help with the code, post your table and field names. [sig]<p>Kathryn<br><a href=mailto: > </a><br><a href= > </a><br> [/sig]
 
moretickets & kathryn,

A small change could save the trouble of having to trap the change. Use the Updatable field as Kathryn suggests, but use int in the OnCurrent event. Set the dropdown list (ComboBox or ListBox) Locked property = [Updateable]

[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top