Results 1 to 4 of 4
  1. #1
    Icewolf0927 is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2010
    Posts
    13

    Locking fields

    Hi
    I have a form that is using a datagrid view. I was wondering is there a way to limit was I unlock or lock. I am trying to put some restrictions in that prevents people from using a field when they are not suppose to. I have created a macro that after the field has been updated depending what it is selected it unlocks the next field. The problem I am having is that it doesn't just unlock it for that one one but it unlocks them all. Is there a way to have the macro on impact that one line?

    Thanks
    Andy

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    Generically (or conceptually...maybe) ; a continuous form has 1 name for a control (in design view you see only one row)....but when populated with data you see continuous/multiple rows....

    therefore you can not control 1 row's field from a macro or high level command point; but what you can do is control that 1 row's field when you are writing/tabbing in that row. So you put the vb in an event in a field - perhaps the AfterUpdate or OnExit event...and when you are in that individual row the code will affect that individual field.

    but of course you do need to remember that if you lock/unlock a field while in its row - - and if you don't want to leave it in that state (affecting other rows) then you must trigger a reversal of that.....

    hope this helps.

  3. #3
    Icewolf0927 is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2010
    Posts
    13
    Thanks I think I get what you are saying. Let me see if I can get it to work.

  4. #4
    Icewolf0927 is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2010
    Posts
    13

    Thumbs up

    thanks NTC your suggestion worked.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Locking cus_num to cus_name
    By revnice in forum Access
    Replies: 7
    Last Post: 08-13-2010, 11:07 AM
  2. Locking form with Visual Basic
    By rev_ollie in forum Forms
    Replies: 4
    Last Post: 04-29-2010, 07:27 AM
  3. Locking Records in Subform
    By MuskokaMad in forum Forms
    Replies: 1
    Last Post: 04-02-2010, 06:34 PM
  4. locking pathways for attachments
    By highland in forum Access
    Replies: 0
    Last Post: 07-26-2009, 06:37 PM
  5. Access Locking other users out
    By David in forum Access
    Replies: 1
    Last Post: 07-02-2009, 09:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums