M
MikeA
I have a database (Access 2000) that allows me to add compliance issues. Up
until now it has been 1 issue to 1 Business Unit. I now need to be able to
create a new record with most of the data the same, but in the new record I
need to select a different Business Unit and a different Business Unit
Contact for the new issue. The Business Unit and Business Unit Contacts are
each in their own tables named accordingly. The issues are in a table named
tbl_Issues.
I would like the users to not have to reenter all of the data, so I am
looking for a solution.
I was thinking of using the Control Wizard to create a "Copy" button, but I
need to be able to modify it to blank out the two fields and require the user
to select new values from the tables. Does this sound doable or do I need to
do this with all VB code moving data field by field? Could someone suggest
the best approach and the code to make it work. I am very new to VB.
This is the code supplied by the Wizard.
Private Sub Add_additional_Business_Unit_Click()
On Error GoTo Err_Add_additional_Business_Unit_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Exit_Add_additional_Business_Unit_Click:
Exit Sub
Err_Add_additional_Business_Unit_Click:
MsgBox Err.Description
Resume Exit_Add_additional_Business_Unit_Click
Thanks
until now it has been 1 issue to 1 Business Unit. I now need to be able to
create a new record with most of the data the same, but in the new record I
need to select a different Business Unit and a different Business Unit
Contact for the new issue. The Business Unit and Business Unit Contacts are
each in their own tables named accordingly. The issues are in a table named
tbl_Issues.
I would like the users to not have to reenter all of the data, so I am
looking for a solution.
I was thinking of using the Control Wizard to create a "Copy" button, but I
need to be able to modify it to blank out the two fields and require the user
to select new values from the tables. Does this sound doable or do I need to
do this with all VB code moving data field by field? Could someone suggest
the best approach and the code to make it work. I am very new to VB.
This is the code supplied by the Wizard.
Private Sub Add_additional_Business_Unit_Click()
On Error GoTo Err_Add_additional_Business_Unit_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Exit_Add_additional_Business_Unit_Click:
Exit Sub
Err_Add_additional_Business_Unit_Click:
MsgBox Err.Description
Resume Exit_Add_additional_Business_Unit_Click
Thanks