Hi,
I have a form on an Access 2000 database which displays a record from a table and on the form the controls (combo\text boxes) are locked to prevent the data being changed. When a button is pressed the controls are unlocked and the following code is used to take a copy of the record, load it into a record set and use this record set to re-populate the form.
I'm using this method so that if changes are made and the user presses a button cancel the changes to the data can be discarded (as the recordset data wouldn't be updated)
Problem is this code displays the data using the new recordset however it can't be edited via the form. Could anyone show me where I am going wrong?
Many thanks,
Grieg.
Dim rstFound As Recordset
Dim SQLprimer As String
SQLprimer = "Select * From tblMain WHERE [tblMain].[ID] = " & findID
Set rstFound = New ADODB.Recordset
rstFound.Open SQLprimer, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
Set Forms("frmViewAppointment"
.Recordset = rstFound
I have a form on an Access 2000 database which displays a record from a table and on the form the controls (combo\text boxes) are locked to prevent the data being changed. When a button is pressed the controls are unlocked and the following code is used to take a copy of the record, load it into a record set and use this record set to re-populate the form.
I'm using this method so that if changes are made and the user presses a button cancel the changes to the data can be discarded (as the recordset data wouldn't be updated)
Problem is this code displays the data using the new recordset however it can't be edited via the form. Could anyone show me where I am going wrong?
Many thanks,
Grieg.
Dim rstFound As Recordset
Dim SQLprimer As String
SQLprimer = "Select * From tblMain WHERE [tblMain].[ID] = " & findID
Set rstFound = New ADODB.Recordset
rstFound.Open SQLprimer, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
Set Forms("frmViewAppointment"