Results 1 to 8 of 8
  1. #1
    testsubject is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2011
    Posts
    6

    Prevent data from being changed in table in comboboxes? Read only mode for forms?

    I have an entry form, which is opened in add mode, an edit form, which is in edit mode. Then I have a search form and a report form, both of which are in edit mode.

    I've discovered a problem with my the search and report forms, where data in the table can be changed inadvertantly.

    On both of those forms I have comboboxes that are populated and autocompleting from a query for the appropriate fields, and then search buttons below them. But if someone were to begin to enter something, and then backspace, it will edit the data in the table. Ive tried to change the allow value list edits to no, and that does not work. Ive tried enabling locked, which from the tooltip of preventing changes to the data in form view is exactly what I want. But when I do that, I become unable to type anything into the combobox at all.

    Is there some other way to open a form from a switchboard, a read only mode, if you will? Or is there a different way of preventing data from being changed at all on those two forms which were opened in edit mode?

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    But if someone were to begin to enter something, and then backspace, it will edit the data in the table.
    In my search forms, I use an unbound combo box in the header, along with the search button.

  3. #3
    testsubject is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2011
    Posts
    6
    Is it possible to make it unbound and still have it autocomplete from a query?

  4. #4
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Having the combo box unbound doesn't affect the row source or the bound column.

    What do you mean by "autocomplete from a query" ?

  5. #5
    testsubject is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2011
    Posts
    6
    I'm honestly not sure how to make it unbound, will look into it.

    By autocomplete from a query, for example, I have one combobox with the controll source as Class, the row source as the following sql:
    Code:
    SELECT DISTINCT BookInfoTable.Class
    FROM BookInfoTable
    ORDER BY BookInfoTable.Class;
    With autoexpand set to yes(to get the autocomplete effect).

  6. #6
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Remove "Class" from the control source, leave the query for the row source and you have an unbound combo box. Unbound refers to not being bound to a field in a table/query.

  7. #7
    testsubject is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2011
    Posts
    6
    That was exactly what I was looking for. Thank you for answering so quickly.

    Could you perhaps reccomend any books that might be of use to me? I feel I have a solid grasp on databases, how to accomplish things with sql, php and the like, but I'm finding it hard to put some of that knowledge to use in access.

    Thank you again.

  8. #8
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I did a quick search and found these:

    Access 2000 Bible by Prague and Irwin
    Access 2000 Developers Handbook Volume 1: Desktop Edition by Getz, Litwin and Gilbert
    Access 2000 Developers Handbook Volume 2: Enterprise Edition by Getz, Litwin and Gilbert
    VBA Developers Handbook by Getz and Gilbert
    SQL Queries for Mere Mortals by Hernandez and Viescas

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

Similar Threads

  1. Replies: 4
    Last Post: 01-14-2011, 10:37 AM
  2. Split forms and filtered ComboBoxes
    By wakp in forum Forms
    Replies: 0
    Last Post: 12-01-2010, 11:10 AM
  3. prevent editing current entries in forms
    By Chazcoral in forum Forms
    Replies: 1
    Last Post: 05-20-2010, 06:49 PM
  4. Need help w/ Forms/runtime mode
    By TechRetard in forum Access
    Replies: 1
    Last Post: 10-06-2009, 04:40 AM
  5. Find out changed data
    By Papote in forum Programming
    Replies: 1
    Last Post: 04-27-2009, 08:19 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