Non-editable fields based on criteria

joeserrone

The cat of the cul-de-sac
Local time
Today, 00:16
Joined
Dec 17, 2006
Messages
164
I'd like to make a text box in a form that obtains the data from a Table Record called (Customer_Number) Editable or Uneditable based on and IF statement. IF the Customer Number contained in the Table Customers is blank or if the Customer Number has a ? mark then the data entry form that pulls that field should be Unlocked.

So If my I have a record stored in my table where the Customer Name is Null or ? I want to be able to edit it in a form.

Thanks
 
I'd like to make a text box in a form that obtains the data from a Table Record called (Customer_Number) Editable or Uneditable based on and IF statement. IF the Customer Number contained in the Table Customers is blank or if the Customer Number has a ? mark then the data entry form that pulls that field should be Unlocked.

So If my I have a record stored in my table where the Customer Name is Null or ? I want to be able to edit it in a form.

Thanks

Hey Joe,

Hope I'm following what your asking for. You could put this in the entry forms OnOpen or OnCurrent event (depending on how you've set up the form):

Code:
If IsNull([Customer_Number]) Or Me.Customer_Number = "?" Then
    Me.AllowEdits = True
Else
    Me.AllowEdits = False
End If

HTH,
Shane
 
Hey Shane!

Yes it is exactly what I was looking for!!! thanks
 

Users who are viewing this thread

Back
Top Bottom