RE: Disable other field in form

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

From: Kiwi lost in Asia (KiwilostinAsia_at_discussions.microsoft.com)
Date: 08/25/04


Date: Wed, 25 Aug 2004 00:33:06 -0700

Well, if you know VB syntax (I dont) then you could loop through the controls
on your field and lock them to start and unlock them wehn OnDirty (or
whatever happens when you click a combo box).

Or else you could set Modal on your details field to YES meaning people
can't click on "parent" forms while it's open. That would fix you up fine.

"Kyle" wrote:

> Thanks anyway, I thought of that too but it is not what I
> wanted.
> The form is very simple, contains only 4 field belows the
> name field. I don't want the user enter the other fields
> first then go back and select the name from the list. I
> want the other 4 fields locked by forcing the user to
> select name first then unlock other 4 fields.
>
> >-----Original Message-----
> >There's probably a better way to do it but here's my
> ghetto (I dont know
> >access very much) version.
> >
> >Have the user select his name on the previous for and
> click the button to
> >open the screen where he/she enters the information. Set
> the default value of
> >the UserName control to whatever it was on the other
> screen and lock it. That
> >way the users can't change details for other people by
> mistake.
> >
> >
> >
> >"Kyle" wrote:
> >
> >> The first box in my form, I have combo box for user to
> >> select his/her name then fill in the remain of the fields.
> >>
> >> How do I freeze all other fields in the form to prevent
> >> user to enter until his/her name is selected first in the
> >> Name field then the user can enter the remain of the
> fields.
> >>
> >> Thanks.
> >>
> >.
> >
>



Relevant Pages

  • Re: Lock and Unlock a Form
    ... out your code so that now I can unlock and lock a form. ... I have added some disabled controls to the exception list, however, i am ... having trouble referencing disabled controls on a subform. ...
    (microsoft.public.access.formscoding)
  • Re: New Record not allowing data entry?
    ... Your code is locking the controls when it displays an existing record: ... Sub LockControls(f as Form) ... I suggest you modify it so it can be used both to lock AND unlock the ... Then your Form_Current procedure can unlock the controls for a new record: ...
    (microsoft.public.access.formscoding)
  • vectra door locks
    ... keys were locked in the boot (dont ask) ever since the very nice man ... put his long tool thingy down in the drivers door to pop the central ... with the key, i can also lock and unlock it with the remote, any ideas? ...
    (uk.rec.cars.maintenance)
  • Re: Command Button to Lock Form Fields
    ... Try it this way with just one command button. ... First set the Command button's caption to either "Lock all" or "Unlock ... For Each c In Controls ...
    (microsoft.public.access.formscoding)
  • Re: A Better Way To Code This
    ... constitute *all* the editable controls on the form (presumably you're ... property of those specific controls to....anything, actually, such as "lock" ... or by allowing the user to unlock them manually. ... > Private Sub Command43_Click ...
    (microsoft.public.access.gettingstarted)