Results 1 to 9 of 9
  1. #1
    panoss is offline Advanced Beginner
    Windows 2K Access 2003
    Join Date
    Oct 2014
    Posts
    59

    How to make Form Datasheet cells unslectable?

    I want to change the behavior of the cells in a datasheet form.
    I want when someone clicks on them the text in the cell Not to be selected and the cursor NOT to enter in the cell.


    I 'v partially achieved this setting focused the second column(field) on the onClick event of the first column(field). The second column is unused.
    But that's not a good solution because the column that receives the focus, has to be visible, or doesn't get focus.
    Is there some better solution?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Don't want to allow editing in the textbox?
    Maybe set textbox properties Locked Yes and TabStop No.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    panoss is offline Advanced Beginner
    Windows 2K Access 2003
    Join Date
    Oct 2014
    Posts
    59
    No I don't want to allow editing in the text box.
    I tried what you suggested but doesn't do anything.
    Also tried with enabled = no: the text box doesn't get selected BUT the record doesn't get selected too .
    I want the record to be selected.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Locked and TabStop work for me. Won't prevent user clicking into the box but they can't edit it.

    Odd, setting Enabled to No did nothing.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    panoss is offline Advanced Beginner
    Windows 2K Access 2003
    Join Date
    Oct 2014
    Posts
    59
    Quote Originally Posted by June7 View Post
    Locked and TabStop work for me. Won't prevent user clicking into the box but they can't edit it.

    Odd, setting Enabled to No did nothing.
    The cursor enters in the text box.
    You can select text.
    I want neither of them.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Well, only thing I know would be to use textbox Click or Enter event to set focus elsewhere.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    panoss is offline Advanced Beginner
    Windows 2K Access 2003
    Join Date
    Oct 2014
    Posts
    59
    I 've rejected this in my first post.

  8. #8
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    So one doesn't really refer to cells in databases.....but be that as it may; I believe your only solution is to use the Conditional Format feature and it may not be adequate. Look for it in the form design and read up a little on it. It takes a little getting used to. Typically it is more oriented toward visual changes such as coloring the background - but you can enter expressions and perhaps can manipulate SetFocus so the cursor won't stay in a field.

    Datasheet, as a continuous form type, does not lend itself to field-specific VBA code - which is why I refer you to the Conditional Format feature. So just understand this as the way it is. You may want to manipulate the user experience to moving into a Single Form - whereby the ability to control individual fields really is unlimited...

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Conditional Formatting can set the control's Enabled property.

    A continuous view form can be made to look like datasheet.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 8
    Last Post: 08-26-2012, 11:11 PM
  2. Replies: 6
    Last Post: 07-13-2012, 11:09 AM
  3. Replies: 4
    Last Post: 05-04-2012, 03:41 PM
  4. Form To Table - To Many Cells
    By LOUM in forum Forms
    Replies: 3
    Last Post: 05-03-2012, 02:21 PM
  5. To put objects in Sheet Form cells
    By mazzanrol in forum Forms
    Replies: 2
    Last Post: 11-30-2011, 03:41 AM

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