Why am I having trouble setting 'AllowEdits'?

Posted on 2009-04-23
Last Modified: 2013-11-28
Hello All,

So I've got a form that has a listbox, and when one selects a record from that listbox and hits my 'view record' button it loads a form that shows all of the listbox values in txt boxes that SHOULD be editable.  I've loaded code for both the 'on click' event from the listbox form and also from the 'on load' event in the 'record info' form itself.  My issue is that in the code I believe that I have enabled all editing properties, but the form still gets totally locked every time...  Please help!
Private Sub cmd_ViewQuoteInfo_Click()

DoCmd.OpenForm "ParametersForm", , , , , acHidden

Forms!ParametersForm!ids_QuoteID = Me.lst_PendingQuotes.Column(0)

Forms!ParametersForm!lng_CustID = Me.lst_PendingQuotes.Column(3)

Dim strFormName As String

Dim strLinkCriteria As String

strFormName = "frm_PendingQuoteInform"


strLinkCriteria = "ids_QuoteID = " & Forms!ParametersForm!ids_QuoteID


Debug.Print strLinkCriteria


DoCmd.OpenForm strFormName, , , strLinkCriteria

Forms!frm_PendingQuoteInform.AllowAdditions = True

Forms!frm_PendingQuoteInform.AllowEdits = True


End Sub

'this is the code that runs when I click a record from the listbox and hit 'view quote info

Private Sub Form_Load()

If Forms!frm_PendingQuoteInform!txt_Status = "Pending" Then

    Me.cmd_delete.Visible = False

End If

Call SecurityCheck(Forms!frm_PendingQuoteInform)

End Sub

'this is the code that runs on the load of my actual quote information page

Open in new window

Question by:Sully143
    LVL 15

    Expert Comment

    Is the data in the underlying query that feeds the form editable?   If you are not using an editable wuery then the resulting dataset will not be editable regardless of whether the form is set to allow edits or not.

    Try opening the query independantly of the form and see if you can edit data in the datasheet of the query.

    Often, queries that have a 1-many relationship between 1 or more tables are not editable.

    Author Comment

    That seems to be exactly my problem.  The query that serves as the row source gets it's data from two tables. And when I run just the query the 'table' it gives back is uneditable.  I didn't even know that could happen.  Is there a way I can MAKE that editable?  Or is that form more or less 'perma-locked'?
    LVL 119

    Accepted Solution

    see this link

    and one of the suggestion on that link is (try this first)

    to set form's RecordsetType property to Dynaset (Inconsistent Updates).

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now