How do I...

R

RobertG

....lock a field on a form from editing, but allow users to input data into
that vield via "Add new entry"?

I have a form which contains a clients' "Client ID" number. I want to make
it so once a number is input into that field it cannot be edited; however, if
someone wishes to add a new "Client ID" number and corresponding data, they
can.

Any suggestions would be greatly appreciated! Thanks in advance.
 
O

Ofer

On the OnCurrent event of the form you can write the code

Me.[Client ID].Locked = Not IsNull(Me.[Client ID])
 
R

RobertG

And how would I get to that point?

I went to the properties of the form, then events, but couldn't find
OnCurrent...

Ofer said:
On the OnCurrent event of the form you can write the code

Me.[Client ID].Locked = Not IsNull(Me.[Client ID])

--
\\// Live Long and Prosper \\//
BS"D


RobertG said:
...lock a field on a form from editing, but allow users to input data into
that vield via "Add new entry"?

I have a form which contains a clients' "Client ID" number. I want to make
it so once a number is input into that field it cannot be edited; however, if
someone wishes to add a new "Client ID" number and corresponding data, they
can.

Any suggestions would be greatly appreciated! Thanks in advance.
 
O

Ofer

Mybe you are looking on the properties on another object in the form, when
the properties box is open, click on the left top corner of the form, to get
the properties of the form.

Another option, in the properties box, there are TABS, select All.

--
\\// Live Long and Prosper \\//
BS"D


RobertG said:
And how would I get to that point?

I went to the properties of the form, then events, but couldn't find
OnCurrent...

Ofer said:
On the OnCurrent event of the form you can write the code

Me.[Client ID].Locked = Not IsNull(Me.[Client ID])

--
\\// Live Long and Prosper \\//
BS"D


RobertG said:
...lock a field on a form from editing, but allow users to input data into
that vield via "Add new entry"?

I have a form which contains a clients' "Client ID" number. I want to make
it so once a number is input into that field it cannot be edited; however, if
someone wishes to add a new "Client ID" number and corresponding data, they
can.

Any suggestions would be greatly appreciated! Thanks in advance.
 
Top