I have a simple form, with an unbound field and all other fields linked to a table. The user enters a value in the unbound field, and the form is fllled with the values taken from the table record to the enterd value. The purpose is to allow changes in one or more fields, and save the edited record. The form properties:
dataentry yes
allow edit yes
allow addition no
allow deletion no
record lock edited records
all fields are
enabled yes
locked no
However, when the form is filled, all fields seem to be locked and cannot be edited. What am I doing wrong, or what am I missing?
The linked table resides in the database under sqlexpress server, and the form is filled with the following code
Code:
Private Sub STessElett_AfterUpdate()
Dim rst As DAO.Recordset, myquery As String
Me.DataEntry = False
'check if tessera elettronica exists
myquery = "SELECT * FROM LibroSoci WHERE [Tessera Elettronica n] = " & Me.STessElett
Set rst = CurrentDb.OpenRecordset(myquery, dbOpenSnapshot)
If rst.RecordCount = 0 Then
MsgBox ("Numero tessera elettronica inesistente")
Else
Me.DataEntry = True
DoCmd.OpenForm "FrmLibroSociModifica", acNormal, , WhereCondition:="[Tessera Elettronica n]= " & STessElett
End If
End Sub
Thank you.