limiting changes to a combo box

Tezdread

Registered User.
Local time
Today, 16:34
Joined
Jul 11, 2002
Messages
105
hi,

we have this database that's used by differerent departments and one of the fields on the form has a combo box for status (pending / completed etc). when this is set to 'Complete' we would like to make sure that it can't be changed again, is this possible?

there is only one table used in this database and updates to other fields are still required so it is only this one combo box that need to be blocked from change once in the completed stage...

Thanks in advance
 
Create a Subprocedure and call it on the Form_Current and Status_AfterUpdate Events

Private Sub LockStatus()

If Me![Status] = "Complete" Then
Me![Status].Enabled = False
Me![Status].Locked = True
Else
Me![Status].Enabled = True
Me![Status].Locked = False
End If

Exit Sub

End Sub

Where Me![Status] is the combo box. Please note there may be some syntax errors in above, I did not test it in Access. You may also you Boolean expressions in the above to improve speed if you are familiar with them.

Good Luck
 
thanks Jay I'll give that a go and see how I get on...
 

Users who are viewing this thread

Back
Top Bottom