The buttons are coded as follows
Select and copy:-
Expand|Select|Wrap|Line Numbers
- DoCmd.DoMenuItem acFormBar, acEditMenu, acSelectAllRecords, , acMenuVer70
Expand|Select|Wrap|Line Numbers
- DoCmd.DoMenuItem acFormBar, acEditMenu, acCopy, , acMenuVer70
Paste:
Expand|Select|Wrap|Line Numbers
- DoCmd.GoToRecord , , acNewRec
Expand|Select|Wrap|Line Numbers
- DoCmd.DoMenuItem acFormBar, acEditMenu, acSelectRecord, , acMenuVer70
Expand|Select|Wrap|Line Numbers
- DoCmd.DoMenuItem acFormBar, acEditMenu, acPaste, , acMenuVer70
This all works fine if i follow these steps.
1: open form
2:locate meeting 1
3:copy equipment from meeting 1
4: locate meeting 2
5:paste equipment from meeting1 to meeting 2
it will not work if i edit meeting 2 first ie. if i take the following steps
1:open form
2:locate meeting 2
3:delete equipment record from list
4:locate meeting 1
5:copy equipment from meeting1
6:locate meeting 2
7:paste equipment from meeting1 to meeting 2
when the records have been pasted using the first example the MS Access message box "you are about to paste 2 records ok cancel" appears
when the second example is used the MS Access message box "you are about to paste 2 records ok cancel" does not appear
and if you look at the table behind the forms it has not updated even though it looks like the new records have been added in the form.
if i do not use the buttons and do the tasks "manualy" either using the copy and paste icons on the toolbar or use the edit copy and paste menu
or if i use short cut keys ctrl c and ctrl v
it works fine which is why i think that it may be related to the butons.
This is the sql statement in the subform
Expand|Select|Wrap|Line Numbers
- SELECT T_EquipBookTemp.EquipBookTmpID, T_EquipBookTemp.EquipID, T_EquipBookTemp.StartTimeID, T_EquipBookTemp.EndTimeID, T_EquipBookTemp.SessionID, T_EquipBookTemp.EquipBooked, T_ActiveSession.StartDate, T_ActiveSession.EndDate, T_ActiveSession.StartTime, T_ActiveSession.EndTime, T_EquipBookTemp.box09, T_EquipBookTemp.EquipBooked
Please help
Regards Phill