locked combobox on form when record in table = n or x

murray83

Games Collector
Local time
Today, 19:05
Joined
Mar 31, 2017
Messages
843
Good Morning, :cool:

this is my code

Code:
'lock selection box
Private Sub Status_AfterUpdate()
If Me.Status.Value = Me.txtStatusDone.Value Or Me.Status.Value = Me.txtStatusRefused.Value Then
Me.cmbActionedBy.Locked = True
Else
Me.cmbActionedBy.Locked = False
End If

my aim is to lock the said cmbActionedBy so when a record is either done or refused it cant be altered

i have tried it in form load and also in the afterupdate part of the status as above but so far to no avail

any ideas what I am obviously doing wrong :banghead:

cheers all :D

attach is a screen shot of the table and form in question
 

Attachments

  • ex1.png
    ex1.png
    94.3 KB · Views: 61
have your tried

Me.cmbActionedBy.Locked = Me.Status= Me.txtStatusDone Or Me.Status= Me.txtStatusRefused

in the form current event?

Note you do not need the .value
 
shall give it a go and let you know
 
CJ_London

works like a charm, job done, problem solved

thank you
 

Users who are viewing this thread

Back
Top Bottom