Form and Sub form save with only one button on MS Access - save

I want to add record with one button on form and sub form. it should remain on current record when cancel or not click button.Product Detail
iNVOICE NO
New Products://i.stack.imgur.com/NYbiL.png
Invoice Form

Go to design tab
Click and drag the button icon into the main form
A wizard should pop up, follow the wizard by
Picking Record operations(to the left),Add new record(to the right)
Click next(at bottom)
Check Text
Click next(at bottom)
Click finish(at bottom)
The images attached depicts the steps.

Related

Two dependent Menus in ASP.NET MVC 5 web application design

I am using the ASP.net MVC 5 to build the web application.
It's little more complicated than the simple MVC example I googled. Not so sure what I've done is the right way to do.
A user is able to select the Region or an item ID: {number} on the left hand in the Menu 1. The menu is populated as a multi-level menu which means there are two levels of this menu, Region and ID.
Each level decides which controller to call. For example, When Region 1 id clicked, RegionsController will be invoked, and render a view for the content.
There is a Menu 2 on the right hand, it's a menu according to which level clicked, so it could be different menu items depending on whether Region or ID were clicked.
Menu 2 is the functional menu, such as Map, Record, ... For example, Map is a menuitem in Menu2 correspoding to Region Level.
Record is a menuitem in Menu 2 corresponding to ID Level.
The layout is showing as below, including two menus (partial view) and a content.
Scenario:
User clicks on Region 1, call the Region controller to render the view on the right. Menu2 is populated according to the Region. A user is able to click any menu items on Menu2 to render the content
When a user clicked on Region 1, call control action to handle /Region/Index/1 to render the view. I will save the Id = 1 to both the cookie and session in order to use when the Menu 2 menuitem1 or menuitem2 had clicked. So the content is decided by Menu 1 and Menu2.
User clicks on ID:009, call the ID controller to render the view on the right. Menu2 is populated according to the Region. A user is able to click any menu items on Menu2 to render the content
Same as 1. When a user clicked on Region 1, call control action to handle /ID/Index/008 to render the view. I will save the Id = 008 to both the cookie and TempData in order to use when the Menu 2 menuitem1 or menuitem2 had clicked. So the content is decided by Menu 1 and Menu2.
Questions:
If I want to see the Region 1 and Map, I need to save which item (Menu1 item) was clicked. So I can render the content when the menuitem# clicked on the Menu2. The truth is every controller needs to get which Id in Menu 1 was clicked.
Save click item
SessionManager.SaveItem(id, this.HttpContext);
Get click item
SessionManager.GetItem(this.HttpContext);
It is too annoying to do this in every controller. Is there a better way?
Menu1 decides which Menu2 menuitems displays. So I have to keep track of which Menu 2 menuitems shall be display. In the IDController Index action, I need to render the partial view with "Record" menuitem. On the contrary, in the MapController, I need to render the partial veiw with "Map" menuitem.
How could I improve this kind of MVC architecture?

Disable form fields and enable them after clicking on edit button

I have a form fields in which I am displaying data.
The values should be disabled and edit button should appear, after clicking on Edit button, the values should be enabled and user can edit the data and only save button should appear
How to achieve these two requirements in a single form in Asp.Net MVC4?
Use templates.
An ITEM TEMPLATE and then an EDIT TEMPLATE.
When the user presses the EDIT button, set the action to change to mode of the form to EDIT.

Avoid click propagation on Page that is under the current page on a TPageControl

I have a TPageControl that contains five pages and the page shown is alternated setting the ActivePageIndex property in this way:
PageControl1.ActivePageIndex := 4;
the problem is that the page below covered by the page currently shown get click on his buttons while the mouse is pressed on the above page, how can I avoid this behaviour ? How can I avoid the propagation of the click on Pages below the currently shown (that is also the current index)?
The application uses CLX as Graphics library instead of VCL.
Delphi does not do click Propagation.
I would check if the button that gets click are placed on the TabSheet and not on the parent control. Find the button you want in the drop down list of object inspector and press - the selected item will be the parent of the button. Is it a TabSheet?
Or you can add this code as a first line of your button-click-function
ShowMessage(TButton(Sender).Parent.Name);

How to realize the automatic jump to the specified page

i want to do a function,that is in page-based,i add a button,when i click the button,pop-up a Select box.In the selected box input the page number,but how can i realize that when i input the page number,the page jump to the specified page
edit:
I want to do a calendar,the label title bar in the top i have used button,now,it is that when i press the button,it will pop up a marquee,in there have month.now ,i want to press a month in the press box,then turn to the corresponding page.

Delphi 2010 Action Manager & Main Menu Bar

I'm trying to use the Action Manager and Action Main Menu Bar in Delphi 2010 an I have no idea how to make this work. I've tried looking at the examples that come with Delphi 2010 and I can't seem to figure this out.
I've tried playing around with the examples. I've been able to add an image to the Image List component and set that item to the new item index. At design time it displays properly at runtime it reverts back to the original.
I'd like to learn how to use the Action Manager and Action Main Menu Bar but I can find any help on these topics. Is there a tutorial on how to use the Action Manager and Action Main Menu Bar?
Drag and drop a ActionManager, a ActionMainMenuBar and a ImageList on your form.
Doubleclick the ImageList, you get the Imagelist Editor. Use the Add-button to add your icons (make sure their sizes are the same as the Height and Width properties that are set in the ImageList-control).
Set the Images-property of the ActionManager to your ImageList and set the ActionManager-property of your ActionMainMenuBar to your ActionManager.
Doubleclick the ActionManager, go to the tab 'Actions' and add new actions by the 'New'-button.
Click each Action in the ActionManager and set each action's properties, at least: ImageIndex (to choose an Icon), Caption and Category.
Note: A Category will serve as a main item in the menu (like File, Edit and View) and each Action will serve as menu item (like Save, Save as, Load). So set the Category property of all actions you want to belong to one main menu item to the same name. For instance give the actions 'Save' and 'Load' the category 'File' and give the actions 'Undo' and 'Redo' the category 'Edit'.
Doubleclick each Action in the ActionManager. You'll get the code editor. Type the code you want to perform when the user clicks this menu item. If you don't type any code or comment, the menu item will automatically be disabled when the application is running.
Now drag the categories from the ActionManager to the ActionMainMenuBar.
That's it.
I think Actions, Action Lists And Action Managers by Brian Long is a great start to explore the realm of actions.

Resources