Hi can anyone help with the following problem please...
I have added a couple of fields (START_ODE & END_ODO BOTH NUMBER FIELDS FOR ENTERING MILEAGE) to a table (REQBOOK).
The table gets updated via a DO...LOOP statement ie.
-------------------------------------------------------
Do Until rstREQBOOK.EOF Or blnFound = True
If Me![BOOKING REF] = rstREQBOOK![BOOKING REF] Then
blnFound = True
rstREQBOOK.Edit
rstREQBOOK![end_ODO] = Me![ODO]
rstREQBOOK![START_ODO] = Me![START_ODO]
rstREQBOOK![Status] = "Returned"
rstREQBOOK![Total_Days_Hired] = Me![tdays]
rstREQBOOK![SYS_DATE_Returned] = Date
rstREQBOOK.Update
Else
End If
rstREQBOOK.MoveNext
Loop
-------------------------------------------------------
The BOOKING REF field on the table has been set up as the primary key.
My problem is that whereas before, each transaction on this table would take less than a second it now takes 20 seconds now that I have added the two new fields.
Does anyone know if this is usual behaviour for Access. If not then can anyone suggest a reason/cure for the problem ?
Thanks
Deakin69
I have added a couple of fields (START_ODE & END_ODO BOTH NUMBER FIELDS FOR ENTERING MILEAGE) to a table (REQBOOK).
The table gets updated via a DO...LOOP statement ie.
-------------------------------------------------------
Do Until rstREQBOOK.EOF Or blnFound = True
If Me![BOOKING REF] = rstREQBOOK![BOOKING REF] Then
blnFound = True
rstREQBOOK.Edit
rstREQBOOK![end_ODO] = Me![ODO]
rstREQBOOK![START_ODO] = Me![START_ODO]
rstREQBOOK![Status] = "Returned"
rstREQBOOK![Total_Days_Hired] = Me![tdays]
rstREQBOOK![SYS_DATE_Returned] = Date
rstREQBOOK.Update
Else
End If
rstREQBOOK.MoveNext
Loop
-------------------------------------------------------
The BOOKING REF field on the table has been set up as the primary key.
My problem is that whereas before, each transaction on this table would take less than a second it now takes 20 seconds now that I have added the two new fields.
Does anyone know if this is usual behaviour for Access. If not then can anyone suggest a reason/cure for the problem ?
Thanks
Deakin69