PDA

View Full Version : Insert Record with MS Access


rsquaredpgh
01-08-2006, 01:15 AM
I'm trying to use the Insert Record Behavior to update a table in MS Access. I want to use the form to directly update two of the fields (studentID, subject) in the table and then have the form update a third field (tutorRate) based on those first two form variables.

I have a recordset based on the following:

SELECT tutorRate
FROM rates
WHERE studentID = MMColParam AND subject = 'MMColParam2'

The form has the fields: studentID, subject, and tutorRate (based on the above record set)

The problem is that when the form updates the table, it does update all three fields BUT it always uses the default value I've placed in the recordset and NOT the value which should be generated by the two form variables.

Does anyone know what I'm doing wrong?

davidj
01-09-2006, 07:31 AM
post all recordset code

you will probably need 2 insert statements