Locking fields with existing data

H

Heather

I'd like to know how to lock a field in a form that has
existing data, however would still allow me to add
information to that field when I insert a new record. I
only want to lock two fields in existing records, not
entire record entries. Any suggestions?
 
D

Duda

try sonething like this

on current event of your form


if me.newrecord then
me.field1.enabled = true
else
me.field2.enable =false
end if
 
J

John Vinson

I'd like to know how to lock a field in a form that has
existing data, however would still allow me to add
information to that field when I insert a new record. I
only want to lock two fields in existing records, not
entire record entries. Any suggestions?

One would be to use the Form's Current event:

Private Sub Form_Current()
Me!txtThisTextbox.Enabled = Me.NewRecord
Me!txtThatTextbox.Enabled = Me.NewRecord
End Sub
 
H

Heather

-----Original Message-----
I'd like to know how to lock a field in a form that has
existing data, however would still allow me to add
information to that field when I insert a new record. I
only want to lock two fields in existing records, not
entire record entries. Any suggestions?
.
Is there any way to do this WITHOUT code, or can someone
explain the way I should use the code provided? I'm very
sorry, I know just enough about Access to damage a good
database! :)
 

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