Re: Key Field Data Entry

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Nikos Yannacopoulos (nyannacoREMOVETHISBIT_at_in.gr)
Date: 10/05/04


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.



Relevant Pages

  • Key Field Data Entry
    ... entering in the SSN or TIN. ... only at the initial entry before exiting. ...
    (microsoft.public.access.formscoding)
  • Re: Key Field Data Entry
    ... If your using the SSN as an index then setup the field in the table as ... > entering in the SSN or TIN. ... > only at the initial entry before exiting. ...
    (microsoft.public.access.formscoding)
  • Re: Key Field Data Entry
    ... >> entered (SSN or TIN). ... >> entering in the SSN or TIN. ... >> only at the initial entry before exiting. ...
    (microsoft.public.access.formscoding)
  • Re: private variables/methods
    ... ENTERING setglobal1.set_the_global ... EXITING setglobal1.set_the_global ... def set_the_global: ... def foo(): ...
    (comp.lang.python)
  • Re: Timeda 8-multiport adapter: only 2 ports available
    ... ns8250_probe: no errors, exiting ... puc_config_timedia: entering with command 4 ... puc_config_timedia: error ENXIO, exiting ...
    (freebsd-current)