Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28

    Configure a Comb Box to be read-only in a form

    I have an access 2013 database that contains two forms for data. One form is the Edit form which is read-write and
    and the other form is Query which shows the values only. I created a combo box in the Edit form in which I have a list that is displayed for selection. When I switch to the Query version, all fields are read only except the combo box I created. It is still allowing the data to be changed. I access both forms from a Task Manager form which has two command buttons Query Edit


    All responses are greatly appreciated.

  2. #2
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    You can define a control's property (the combo box is a control, and the control has a list of properties) by lock property or limit to the list

    http://stackoverflow.com/questions/1...in-access-2000

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    One form can serve both purposes.

    If the form is opened with acFormReadOnly parameter then no data can be edited.

    Docmd.OpenForm "form name", , , , acFormReadOnly

    If you have a form for only viewing, then why is there a combobox? It has a lookup with alias? Instead of combobox, include the lookup table in the form's RecordSource.
    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.

  4. #4
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28
    I have the form working correctly in read/write and query for all combo boxes except the one I created. If I set "yes" to the lock definition, the edit/update form view will not allow for any selections. I am not using a alias lookup and I do have the lookup table defined in the form's RecordSource.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I am confused. Do you have one form or two forms?
    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.

  6. #6
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28
    I have a single form. I have two command buttons. one is query and one is edit.

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Did you try the acFormReadOnly parameter for opening the form as read only?
    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.

  8. #8
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28
    Yes, it is defined in the vb script.

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Then all data controls should be not editable.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

  10. #10
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28
    Here is my database ........ thanks for your help in advance.
    Attached Files Attached Files

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    There aren't any forms in that db.
    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.

  12. #12
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28
    The zipped database with folders in 4.5MB. How can I send it to you?

  13. #13
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    This is a split design? You only posted backend? The frontend is 4.5MB zipped? One way is to copy frontend and delete objects not needed for the issue.

    Otherwise can upload to a fileshare site such as Box.com and post link to file. However, I have problems downloading large files (weak internet at home).
    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.

  14. #14
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28
    I am going to send the file via citrixShareFile. Is this the e-mail address for you?

    http://www.cpearson.com/excel/debug.htm

  15. #15
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    No, that is not my email. That is just an information link I reference. I do not post my email to forum.
    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.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 09-04-2015, 09:55 AM
  2. Replies: 5
    Last Post: 12-05-2013, 07:54 AM
  3. All Textboxes Read-Only on Form
    By cbrsix in forum Programming
    Replies: 5
    Last Post: 04-16-2013, 01:47 PM
  4. How to configure odbc-connection from vba-code
    By torunsu in forum Import/Export Data
    Replies: 3
    Last Post: 09-06-2011, 07:27 AM
  5. Replies: 2
    Last Post: 10-19-2006, 04:37 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