Locking indivudual fields on a subform

Bruce75

Psychologist
Local time
Today, 02:30
Joined
Sep 29, 2004
Messages
46
Hi

I am pretty stuck on this on. It is probably simple. I am suspect I am just a little thick.

I have a form with a subform attached. I am trying to lock only certain fields on the subform. The idea being that the user selects a number from a pull down menu, and then the rest of the fields are automatically filled in. It does this fine, I just cannot seem to figure out how to lock all the other fields, except the selection field (combobox).

I have tried selecting the subform in design view and locking the fields there. This seems just to lock the whole field. I have also opened the subform in design view, and set the properties appropriately here. This works fine when I open the subform, but when I open the form that contains the subform, the locking properties I set seem to have no effect.

Apologies if this has been covered before, but I could not find a thread - this, however, could be because i misunderstood the threads themselves.

Many thanks for any help,

Bruce
 
in the AfterUpdate event of your combobox:

Me.sfrmName.Form!txtControlName1.Locked = True
Me.sfrmName.Form!txtControlName2.Locked = True

(don't forget .Form!)
 
thank you very much!
 

Users who are viewing this thread

Back
Top Bottom