Re: Key Field Data Entry
From: Nikos Yannacopoulos (nyannacoREMOVETHISBIT_at_in.gr)
Date: 10/05/04
- Next message: Allen Browne: "Re: Incorrect ColumnHeads"
- Previous message: peter walker: "Re: schedule task"
- In reply to: Lori: "Key Field Data Entry"
- Next in thread: Terry: "Re: Key Field Data Entry"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 5 Oct 2004 15:33:57 +0300
Lori,
Put the following code behind the form's On Current event:
If Me.NewRecord Then
Me.txtSSN.Enabled = True
Else
Me.txtSSN.Enabled = False
End If
where I have assumed the control's name to be txtSSN (change to the actual
name). This event fires when you first open the form, and every time you
move to another record, existing or new. This piece of code will only enable
the control on a new record, keeping it disabled on existing ones, so users
cannot make changes in it in an existing record.
HTH,
Nikos
"Lori" <anonymous@discussions.microsoft.com> wrote in message
news:3fa501c4aad4$ba97dd80$a401280a@phx.gbl...
> Hello everyone,
>
> Hope someone can help me. I have a form that instead of
> an autonumber key field. I have a number field to be
> entered (SSN or TIN). I'm having problems with staff
> entering in just any (Dummy) number just to get the
> contact in and then at a later date going back in and
> entering in the SSN or TIN. This is causing a problem
> because when the contact is used in other areas of the
> database, and then the number is changed the contact
> disappears from the other areas. To eliminate this
> problem I would like to lock this field once exiting from
> the contact screen, once the form is filled out. I would
> like for them to have the ability to change that number
> only at the initial entry before exiting. Can anyone
> tell me how to do this? Thanks in advance.
- Next message: Allen Browne: "Re: Incorrect ColumnHeads"
- Previous message: peter walker: "Re: schedule task"
- In reply to: Lori: "Key Field Data Entry"
- Next in thread: Terry: "Re: Key Field Data Entry"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|