• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 289
  • Last Modified:

Why am I having trouble setting 'AllowEdits'?

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

0
Sully143
Asked:
Sully143
1 Solution
 
MNelson831Commented:
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.
0
 
Sully143Author Commented:
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'?
0
 
Rey Obrero (Capricorn1)Commented:
see this link

http://msdn.microsoft.com/en-us/library/aa198446(office.10).aspx


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

to set form's RecordsetType property to Dynaset (Inconsistent Updates).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now