Sully143
asked on
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!
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
ASKER
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'?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.