Inhibit edit of one text box based on the contents of another

B

BobC

The two text boxes are on the same form (subform3).
I want to inhibit the Quantity filed from being edited if the Status
field contains "Ship Requested".

The following code gives me an error 'Expected: list separator or )'
Private Sub Quantity_BeforeUpdate(Cancel As Integer)
' Inhibit txtbox if the Status field is "Ship Requested"
IIf(me.Status = "Ship Requested"; me.AllowEdits = True, _
me.AllowEdits = False)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top