MS Access, by enabling the (Use Control Wizard) and click command Button (Form Control), will guide you to make a command wizard as we created in the module Global_Procedure. Here are the function created in Global_Procedure: Global_Exit, Global_Next, Global_Previous, Global_Last, Global_First, Global_Close, Global_Deletion, Global_Preview, Global_OpenForm, Global_Preview_Unrefreshed, Global_Process_Deletion, Global_Undo, Global_Print, Global_PrintUnRefreshed, Global_AddNew, Global_Find. Those all generated form Button (Form Control) wizard applied in predetermined form event procedure, but with some modifications, we can move them to module Global_Procedure.
We will create the command button as depicted here
in each form we have created. Do the following steps:
- Open frmMainAccount in Design View and disable , first.
- On the FormHeader, add Form Control Button by clicking Design tab and Button icon in Controls group.
- Go to Command Button property sheet and set the following properties:
- Name = GoToFirst
- Caption = First
- Picture = select Go To First from the available list of picture
- ControlTipText= Go to first record
- On Click = =Global_First()
- Do step number 2 for the following commands:
- Go to previous, Command Button property:
- Name = GoToPrevious
- Caption = Prev
- Picture = select Go To Previous from the available list of picture
- ControlTipText= Go to previous record
- On Click = =Global_Previous()
- Add new record, Command Button property:
- Name = AddNewRecord
- Caption = Add
- Picture = select Go To New from the available list of picture
- ControlTipText= Add new record
- On Click = =Global_AddNew()
- Go to next, Command Button property:
- Name = GoToNext
- Caption = Next
- Picture = select Go To Next from the available list of picture
- ControlTipText= Go to next record
- On Click = =Global_Next()
- Go to last, Command Button property:
- Name = GoToLast
- Caption = Last
- Picture = select Go To Last from the available list of picture
- ControlTipText= Go to last record
- On Click = =Global_Last()
- Close form, Command Button property:
- Name = CloseForm
- Caption = Close
- Picture = select Exit Doorway from the available list of picture
- ControlTipText= Close this form
- On Click = =Global_Close()
- Delete record, Command Button property:
- Name = DeleteRecord
- Caption = Del
- Picture = select Delete Record from the available list of picture
- ControlTipText= Delete current record
- On Click = =Global_Deletion()
- Undo last action, Command Button property:
- Name = UndoLastAction
- Caption = Undo
- Picture = select Undo from the available list of picture
- ControlTipText= Undo last action
- On Click = =Global_Undo()
- Find record, Command Button property:
- Name = FindRecord
- Caption = Find
- Picture = select Binoculars (Find) from the available list of picture
- ControlTipText= Find record
- On Click = =Global_Find()
- Go to previous, Command Button property:
- Go to form properties and set the following properties:
- Caption = Chart of Account - Main Account
- Record Selectors = No
- Navigation Button = No
- Final display will lok like this:
No comments :
Post a Comment