Hi all.
I have a question, i want to insert a new record in a subform and insert the previous balance from the record before it. I have the following function where i add the new record
Function AddBalance(rstTemp As DAO.Recordset, Bal As Double)
'Adds a new record to the recordset using the balance for previous balance
With rstTemp
.AddNew
!BeginBalance = Bal
.Update
'.Bookmark =
End With
End Function
When i run it i get the following error:
Runtime Error: 3201
"You cannot add or change record because related record is required in table"tblCustomers"
I am not sure how to go about adding it to the Mainform table. Any help would be appreciated.
THanks
RAven
I have a question, i want to insert a new record in a subform and insert the previous balance from the record before it. I have the following function where i add the new record
Function AddBalance(rstTemp As DAO.Recordset, Bal As Double)
'Adds a new record to the recordset using the balance for previous balance
With rstTemp
.AddNew
!BeginBalance = Bal
.Update
'.Bookmark =
End With
End Function
When i run it i get the following error:
Runtime Error: 3201
"You cannot add or change record because related record is required in table"tblCustomers"
I am not sure how to go about adding it to the Mainform table. Any help would be appreciated.
THanks
RAven