Remove Readonly state from Modal Form

AbbottF

Registered User.
Local time
Today, 17:08
Joined
Jan 22, 2013
Messages
25
I have a modal data entry form that is launched from a Readonly subform on a tab. Everything displays properly on the form except I cannot chage any field values. The form params are set to True (Allow Deletions, Allow Edits and Data Entry).

The form is launched with:

Code:
    If isFinancial Then
        queryName = "FinancialEntries"
    Else
        queryName = "FellowEntries"
    End If
    
    sqlFilter = "[FinanceFellowID] = " & ffID
    
    DoCmd.OpenForm "frmFinancesFellowsCRUD", acNormal, queryName, sqlFilter, acFormEdit, acDialog

Any suggestions please?
 
Thanks for the quick response.

The purpose of the modal form is to allow edits of the rows in the list of the calling form.

I set data entry = No and the fields are all still protected. The calling form, which is readonly lists all the rows for the member. When a row is clicked, the modal form is opened using the default recordset entry. Could that be part of the problem? Should I open a new recordset with only that row?
Thanks again
 
Last edited:
I was thinking the same thing so I've modified the form call to use the raw table as opposed to a complex Query that involved 4 linked tables. I now get error 3326 the "This Recordset is not updateable". Could this be related to the fact that I have the complex query open in the calling form? The calling data is correct ...Here's the call
Code:
' Returns true if data is to be reloaded (may not be necessary)
Public Function ShowFinanceFellowModal(ffID As Integer, isFinancial As Boolean, ContactName As String) As Boolean
    
    Dim bRecordChanged As Boolean
    Dim queryName As String
    Dim sqlFilter As String
    queryName = "FinancialFellow"
    sqlFilter = "FinanceFellowID = " & ffID
    DoCmd.OpenForm "frmFinancesFellowsCRUD", acNormal, queryName, sqlFilter, acFormEdit, acDialog
    'DoCmd.OpenForm "frmFinancesFellowsCRUD", acNormal, , , acFormEdit, acDialog, contactName
    
    ' Here, we will retrieve the value in the password text box.
    bRecordChanged = Forms!frmFinancesFellowsCRUD.chkUpdatedAdded
    
    ' Now, we will actually close the password form
    DoCmd.Close acForm, "frmFinancesFellowsCRUD"
    
    ' And finally, we return the value we retrieved
    ShowFinanceFellowModal = bRecordChanged 
    
End Function

Thanks for keeping up with this. I'm feeling quite stupid. I do much better in C#, EntityFramework and VisualStudio.
 
Addendum: I set a unique index with all the relationship keys. I was most often getting -
error 2501 OpenForm action was cancelled with the Recordset not updateable appearing periodically.
 
Thanks. I decided to take the easy way out and just passed the id of the record to update to the modal form and opened a new recordset with the single row. Everything is almost working. Jut having a problem when I go to save the record, says it's opened by someone else. That seems to be a simpler problem than trying to solve some hidden under-pining issue with access. BTW, I only join on PK fields which are all Autonumber. This is my 2nd week of VBA (I usually do C#) so my ignorance is glaring.
 

Users who are viewing this thread

Back
Top Bottom