Problem with updating unbound field

AbbottF

Registered User.
Local time
Today, 15:43
Joined
Jan 22, 2013
Messages
25
I have a single record recordset that is loaded form a table and set as the forms recordset. All fields that are bound to controls update properly. I have 2 fields whose value change when 2 unbound combobox values change.
1. The value shows as updated in the recordset
2. The call to Recordset.Update does not cause an error.
3. The call to Recordset.Close brings up a dialog ...

Write Conflict
This record has been changed by another since you started editing it, ...
When I click Save Record, all the changes except the 2 unbound values get changed.

Any suggestions on how I should proceed to fix this issue?
Thanks
 
What does this really mean??
All fields that are bound to controls update properly

I have a single record recordset that is loaded form a table and set as the forms recordset.
 
Reply to what does this mean ...

1. Values that change in all the date and text controls that are bound to Recordset fields properly update the db when Recordset.Update is called.

2. This is a Modal form with FinanceFellowID being passed in OpenArgs.

Code:
    Dim rst As DAO.Recordset
    Dim query As String
    
    query = "SELECT *  " & _
        "FROM FinanceFellow " & _
        "WHERE FinanceFellowID = " & FinanceFellowID

    Set Me.Recordset = CurrentDb.OpenRecordset(query, dbOpenDynaset)
 
You are confusing me.

Why call an sql string query?? Query is a special thing in access.

Where is your OpenForm with the Openargs?

What exactly is the code snippet you have included?
 
I was trying to keep things short. I call it a query or querystring, since I come out of the SQLServer world.

The the OpenForm is ...
Code:
DoCmd.OpenForm "frmFinanceFellow", acNormal, , , acFormEdit, acDialog, ffID

ffID is the key field of the FinanceFellow table.

The included code snippet is from inside the Form_Load() Subroutine
 
Your last post got me thinking. All I had to do is create 2 hidden bound textboxe to the 2 fields and set the values of the text boxes. That solved the problem. I was trying to think too much like a C# programmer, not like an Access programmer.
 
Glad you have it resolved.
 

Users who are viewing this thread

Back
Top Bottom