Update Record

  • Thread starter Thread starter suzie
  • Start date Start date
S

suzie

I want to disable one field (e.g Identification Number)
from being editing. When user has entered data and they
want to update the other field, the can do so..but when
they click at Update button, other field can be edited
except Identification Number. It remains unchanged

Form has 5 fields:
i. First Name
2. Last name
3. Identification Number
4. Address
5. Phone Number

other fields can be updated except Identification Number

TQ
 
If this is on a form, you can change the following properties for that one
field: Locked = Yes, Enabled = No.

HTH,
Debbie


I want to disable one field (e.g Identification Number)
from being editing. When user has entered data and they
want to update the other field, the can do so..but when
they click at Update button, other field can be edited
except Identification Number. It remains unchanged

Form has 5 fields:
i. First Name
2. Last name
3. Identification Number
4. Address
5. Phone Number

other fields can be updated except Identification Number

TQ
 
i tried this method, but when i want to enter a new data
the identification number field is locked.
e.g i have 4 records and I want to enter the next record
(record no 5)..i can enter all info except identification
number.
for existing record, it is working fine as i cannot edit
this field. but what about new data?
 
Suzie,

In the On Current Event:

Private Sub Form_Current()
If Me.NewRecord then
Me.YourID.Locked = False
Me.YourID.Enabled = True
Else
Me.YourID.Locked = False
Me.YourID.Enabled = True
End If
End Sub

Debbie


i tried this method, but when i want to enter a new data
the identification number field is locked.
e.g i have 4 records and I want to enter the next record
(record no 5)..i can enter all info except identification
number.
for existing record, it is working fine as i cannot edit
this field. but what about new data?
 
Oops! I copied and forgot to change the values:

In the On Current Event:

Private Sub Form_Current()
If Me.NewRecord then
Me.YourID.Locked = False
Me.YourID.Enabled = True
Else
Me.YourID.Locked = True
Me.YourID.Enabled = False
End If
End Sub

Debbie



Suzie,

In the On Current Event:

Private Sub Form_Current()
If Me.NewRecord then
Me.YourID.Locked = False
Me.YourID.Enabled = True
Else
Me.YourID.Locked = False
Me.YourID.Enabled = True
End If
End Sub

Debbie


i tried this method, but when i want to enter a new data
the identification number field is locked.
e.g i have 4 records and I want to enter the next record
(record no 5)..i can enter all info except identification
number.
for existing record, it is working fine as i cannot edit
this field. but what about new data?
 
Back
Top