Locking a form if the record has been "signed off"

Cocis91

Registered User.
Local time
Today, 16:26
Joined
Dec 30, 2000
Messages
14
I have an Orders form which has on it a field which is a tick box which is ticked if there is nothing left outstanding on the order - ie if it has been sent and if it has been paid for.

I would like it that when an order is signed off, a user cannot accidentally change any of the information in it. The best thing for this would be if the form's Recordset Type property changed to snapshot automatically.

I tried this by using a macro but when the tick box is ticked, the form changes to snapshot and then re-queries, and in so doing going back to the first record in the query.

Is there a way to stop it going back to the first record, or is there a better way to achieve what I have described above?
 
You could try locking each of the individual controls, instead of using the snapshot mode. Maybe that'll work better...worth a shot.
 
This is the first time I've offered a solution rather than posting a question, hope its relevant and helps you:-

Private Sub Form_Current()
If Me![Combo23] = "Closed" Then
Me.AllowEdits = False
Me.Detail.BackColor = 10092543
End If

You would obviously replace the condition with your own. This will not lock the record straight away (I found this to be an advantage, in case somebody selected close in error, they still had the oppurtunity to back out), but once the form is not current the records will be locked.

The color sets the background to a different color which made closed records stand out.

Cheers
NH
 
Many thanks for your solution. I did the same thing as you described but with a Macro. It works fine.
 

Users who are viewing this thread

Back
Top Bottom