I have to be sure a table, tblServiceSolution , is updated with a new record each time a new work item is entered and saved on main work form if it doesnt currently exist! . I thought I would as part of the save event when new item is entered, open a DAO.recordset, as dynaset, based on saved query and test to see if the input was there, and if not add the record.
After clicking on the save button I got error, Too few parameters, Expected 1.
Note 1. The query SQL was created by Access.
2. I checked the [Forms]![WorkEntryForm]![T
ext33])) in the immediate window, and it returned the correct input.
3. I would have thought that was the only parameter I would need.
I thought this save area, indicating a new record, would be the best place to test the new input against the needed table.
I will stop here and know I cant really redesign the original items at this point just want to get the general idea of opening the recordset as a dynaset with this criterion to work.
Thank you for any help.
I am in Windows XP, and this is MS Access 2002.
And then the recordset creation
Private Sub cmdSave_Click()
On Error GoTo Err_cmdSave_Click
Dim db As DAO.Database
Dim rstSolution As DAO.Recordset
Set db = CurrentDb()
Set rstSolution = db.OpenRecordset("qryBillingStatus", dbOpenDynaset)
If Not rstSolution.BOF And Not rstSolution.EOF Then
!TrackingNumber = Me.Text33
!DateStarted = Me.EnteredDate