Results 1 to 5 of 5
  1. #1
    Analogkid is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    27

    Changing Data Entry value to False to edit records

    Hope this makes sense.


    I have the main form open up where the Data entry is set to YES so it opens in New Field. I created a button to change the value of form's Data Entry to NO. It works. Changed the form so I can navigate through entered fields. I have created a drop down to filter a specific field "Claim#" and it will open that entry. The drop down only works if I set the default form's Data Entry to NO. Dropdown works and I can select Claim#. But if I open the form with DataEntry set to Yes, and I click on the button to change the value to NO, the form changes but the drop down field does not pull up the proper information. The button code is.

    Private Sub EditButton_Click()
    Form_MainForm.Form.DataEntry = False
    End Sub

    The Claim drop down has this event after update

    Private Sub ClaimSearch_AfterUpdate()
    Me.Requery
    End Sub

    I'm missing something. Like I said, it works without having the button change the value.
    Access 2010
    Hope this makes sense.
    Thank you for your help

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Try requerying the combobox in the button event.

    Me.comboboxname.Requery
    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
    Analogkid is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    27
    Thank you June7. But I had a pro on the phone and he fixed it for me. The proper code for the search after update is.
    Me.Recordset.FindFirst "[ClaimID]=" & Me.ClaimSearch (the ClaimID is what the query is searching on)

    Thank you!

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I hope that solves your problem. However, I did not get that filtering the form is the issue. I interpreted the issue as the combobox RowSource was not refreshing.
    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
    Analogkid is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    27
    That was exactly what I thought that it was the combobox refresh issue. But the code above works like a charm.
    Later!

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

Similar Threads

  1. Select All Records Where Void equals False
    By burrina in forum Forms
    Replies: 4
    Last Post: 12-23-2012, 12:01 AM
  2. Prevent edit or delete data or records from a table
    By mosquito_admin in forum Security
    Replies: 1
    Last Post: 03-01-2012, 06:02 PM
  3. Replies: 7
    Last Post: 01-29-2012, 07:44 AM
  4. SELECT "False" if any records are false?
    By Azurewrath in forum Queries
    Replies: 6
    Last Post: 12-21-2011, 03:36 PM
  5. changing data in many records
    By cforce in forum Programming
    Replies: 1
    Last Post: 07-22-2010, 02:30 PM

Tags for this Thread

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