paulhenley
Registered User.
- Local time
- Today, 16:00
- Joined
- Apr 16, 2002
- Messages
- 23
I have a form that has a "duplicate record" button which allows the user to copy a selected item and create a new record. This works well and even selects the next item number when adding the copied record.
All was OK until I added a requery command on controls that appear later in the form. There are many calculated fields in the form along with key fields that are included in the calculations.
I have tried to find an alternative to requery (including repaint etc) but none recalculate correctly when data is changed.
If I remove this requery command and use the "duplicate record" the form adds a new item with the next number. If I reinstate the requery command and try to use the "duplicate record" the form tries to create a copy but then gives an error because the item number does not increment (it's the same as the item I am copying and hence - duplicate value in an indexed field).
Please can anyone help?
All was OK until I added a requery command on controls that appear later in the form. There are many calculated fields in the form along with key fields that are included in the calculations.
I have tried to find an alternative to requery (including repaint etc) but none recalculate correctly when data is changed.
If I remove this requery command and use the "duplicate record" the form adds a new item with the next number. If I reinstate the requery command and try to use the "duplicate record" the form tries to create a copy but then gives an error because the item number does not increment (it's the same as the item I am copying and hence - duplicate value in an indexed field).
Please can anyone help?