How do I...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

....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.
 
On the OnCurrent event of the form you can write the code

Me.[Client ID].Locked = Not IsNull(Me.[Client ID])
 
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.
 
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.
 

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

Back
Top