Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2010
    Posts
    9

    Unanswered: Disabling "Refresh" and "Refresh All" on Forms

    Hello. I have a database with a form that appends data to a table. I've put in a lot of code to make this process as idiot proof as possible so that the people using it can't possibly mess up the data. The only problem I have is that if someone opens a form and clicks "Refresh" or "Refresh all", previous records will show. These records could then be edited and someone who doesn't know what they're doing could possibly screw up all my data. Is there any way to disable the refresh button as well as the F5 button? Or a way to keep the refresh process from happening unless I tell it too in the code? Thanks for your help will be willing to give any info to get help.

  2. #2
    Join Date
    May 2010
    Posts
    601
    I have never had that happen when I set the form's record source to a query with a Where clause to filter the data.

    What are the steps in building a form that duplicates the issue?

    Or even better, can you post a sample database?
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  3. #3
    Join Date
    Nov 2010
    Posts
    9
    Unfortunately I cannot post a sample database. Basically what I did was create a table with all the relevent fields and then created a blank form and added the fields with the add existing fields button. The control sources from all my text boxes in the form match those of the table and I input the data. This has actually happened to me more than once. I believe the problem is that I'm putting data into a table where you mentioned a query. Is it possible to input information from a form to a query?

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Try setting the DataEntry and AllowAdditions properties of the form to True.
    Have a nice day!

  5. #5
    Join Date
    Nov 2010
    Posts
    9
    That was it! I didn't have the property data entry set to yes. Now when I refresh it doesn't go back to the first record it goes to a new record. thanks. Since I would like to learn about this for the future what do the data input property and allow additions property do? Apparently a lot of my forms have yes for allow additions and no for data entry.

  6. #6
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    From Microsoft Access Help (and MSDN):
    Set the AllowAdditions property to No to allow users to view or edit existing records but not add new records.

    If you want to prevent changes to existing records (make a form read-only), set the AllowAdditions, AllowDeletions, and AllowEdits properties to No. You can also make records read-only by setting the RecordsetType property to Snapshot.

    If you want to open a form for data entry only, set the form's DataEntry property to Yes.

    When the AllowAdditions property is set to No, the New Record command under Recordson the Data tab isn't available.
    You can use the AllowEdits property to prevent changes to existing data displayed by a form. If you want to prevent changes to data in a specific control, use the Enabled or Locked property.

    If you want to prevent changes to existing records (make a form read-only), set the AllowAdditions , AllowDeletions , and AllowEdits properties to No. You can also make records read-only by setting the RecordsetType property to Snapshot.

    When the AllowEdits property is set to No, the Delete Record and Data Entry menu commands aren't available for existing records. (They may still be available for new records if the AllowAdditions property is set to Yes.)

    Changing a field value programmatically causes the current record to be editable, regardless of the AllowEdits property setting. If you want to prevent the user from making changes to a record (AllowEdits is No) that you need to edit programmatically, save the record after any programmatic changes; the AllowEdits property setting will be honored once again after any unsaved changes to the current record are saved.
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •