Microsoft Access New Tab button in Form - forms

What I'm trying to do is create a form where people input data. They're basically going to be tracking what they've done on a computer.
I'd like to have one main form that starts off with a brief intro and then a tab where they're going to be entering the information.
I'd like them to have the option of adding new tabs, so they can track their actions with multiple computers at once.
What would I need to have the button do in order to open a new tab next to the existing one?

Related

Microsoft Access How to refresh the parent form from the subform

I know this question has been ask thousands of time, but I couldn't find a direct answer for this problem.
I am a programmer, but I never bothered learning VBA since this is only a small project I am doing on the side. I would prefer only using macro's.
I currently have a parent form inside a navigation menu, which has a datasheet table which display all the information about all the customers.
http://i.stack.imgur.com/d3TdM.png
In this parent form, I have a button to allow the user to add a new customer which opens a pop up form.
http://i.stack.imgur.com/RDSvq.png
I want the save button in this pop up form to update the parent form onClose. I know the record is working since if I switch off to a different tab and come back to it. I can see the new record added to the table.
Put this on the form frm_addNewCustomer on close event
Private Sub Form_Close()
[Forms]![TheFormYouWantUpdated].Refresh
End Sub

forms showing in runtime as soon as they are created

In runtime when the forms are being created, 2 forms constantly keep appearing when I haven't programmed them to show as soon as they are created, and my system runs. I was wondering why this happened and whether there is anything to solve this? I don't think I need to show my code here since it's pretty basic and there is none for the OnCreate event.
From the main menu, use Project->Options->Forms, and remove the forms you don't want to see from the Auto-create list. (Click the >> button to move them from the left side to the right side.)
(It's worth mentioning that you can also affect the order in which any autocreated forms or datamodules are created from that dialog by just dragging them up or down in the list. Note that the first form to be created becomes the application main form, so when it is closed the application will close as well; this means that the only thing above your main form in the autocreate list should be datamodule(s) that are accessed by the main form.)
If you never want any forms auto-created, go to Tools->Options->Environment Options->Form Designer, and uncheck the very last item labeled Auto create forms & data modules at the bottom. Note that your main form will always be auto-created, as it's what controls the application's lifetime for form based applications.
By default delphi creates all the forms in the beginning. You can open the .dpr file and delete the ones that you don't need. You could also do that from the UI.
For the forms that you don't want to appear at the start of runtime, go to the properties of the form (lower left hand side) and uncheck Visible. This should do the trick

GWT Activities and places: Reusing modal dialogs?

I am trying to get my head around GWT Activities and Places. And I am not sure how to implement a specific functionnality.
Let's assume here that I am also using MVP, and that my Activities are my Presenters.
Say I have an activity (let's call it activity A) (and its corresponding view) that is displaying a list of customers. The user can click on a "create customer" button in the view.
What I want to do is this: I want a "create customer" dialog to pop up on top of the current activity when the user clicks on the button. I also want all logic related to said dialog to be separated, so it can be reused later.
For example, the same dialog could be reused in a "create invoice" activity. So the user could click a similar "create customer" button in the "create invoice" activity, and be presented with the same dialog as used earlier.
Now, if I understand it correctly, I do not want to goTo() a new place, since it would terminate the current activity "list customers" or "create invoice".
I have thought about defining a "CreateCustomerPresenter" and a "CreateCustomerDialog" (which would be the corresponding view", and having my "list customers"/"create invoice" Activities (reminder: they also are my Presenters) extend the "CreateCustomerPresenter", but I don't know if it would be a wise idea...
What is the recommended way of reusing logic+view associated with a dialog in the context of an activity?
There are several valid approaches, but the one I usually prefer is this: Not to treat dialogs as places (activities) at all.
Reasoning: A place means, that you can reach it via bookmarks/browser history. Let's say I'm on the customer list, and I click "edit customer", a dialog opens. Do I want to "go back" to the list when I click the browser back button? And will the dialog open again when I click the browser forward button? I doubt it, and believe that a user wants to use the browser buttons to go back/forward entire 'pages' within the app (i.e. a concept that feels to the user like a page), but not open/close dialogs within the page.
I have done exactly this very recently.
The approach I took was to create an activity/view in the usual way for the content of the dialog. To launch, create the activity/view to embed in the dialog - I termed this a sub activity. Create the modal dialog and then call start on the sub-activity passing in the dialog content as the panel. In the main activity I then redirected the mayStop, stop etc to the sub-activity.
The tricky part was handling the dialog closing and passing control back to the main activity. I ended up adding a listener to the dialog and firing events on the event bus which were picked up my main activity. I am not 100% happy with this but it does work.
I have not used it but I think that GWTP supports this and other ways of creating sub-activities out-of-the box.

How can I change the whole structure of a form by clicking a button ( Visual C# Express 2010 )

I'm new here as I am programming with Visual C# Express 2010.
Thats the case:
I have the first form, it contains labels, buttons, textboxes etc. I want one of these buttons to change all the aspects of this first form in order to create a second one.
An example of what I want is an ordinary installer program. It has one form ( I think ). And we have "next" button. Clicking on it, the whole form structure will change.
PS: Im not making an installer program.
Thank you!
It might be easier simply to develop a new form, and have the button launch an instance of that new form.
That said, you can programatically change aspect of GUI elements by using the appropriate properties.
For example, suppose you have a label lblStatus somewhere on the form. You can change its location and text with the following lines:
lblStatus.Location = new Point(20, 0);
lblStatus.Text = "Updated Status";
Hopefully this is helpful to get you on the right track.
You could do multiple things:
Use tab pages for each page of things that you want. Add a button outside of the tabs that will change to the next one.
Add a button and a panel on the form. Each page of the form is a different UserControl. When you click the button, fill the panel with a new instance of the UserControl that you want.
Do something like this: http://www.codeproject.com/KB/miscctrl/DesignTimeWizard.aspx
Or this: http://visualstudiogallery.msdn.microsoft.com/en-us/c2c412fd-bd28-4e3b-9c20-4dc381ac5199

Editing Records with MVVM/MVVM-Light

I have created a very simple wpf app with mvvm light.
I have rows in a list view, these are templated representations of Book objects.
I can click a row, then click an edit button, this button loads a new window and sends the new window the book to edit (using mvvm-light's Messenger).
The issue I have is when I edit the record in my new window the data on the main form is updated. The text boxes are bound to the object received via the Messenger.
I know this is because I have essentially passed a reference to the same Book object around the place, therefore I update in one place.. and voilĂ  it updates on the main page too.
What I would like to know is.. is there a standard way/method/concept to achieve what I am trying to do? i.e. create an "edit" page/screen with the option of discarding the edits?
thanks.
Could you make your entity implement ICloneable and create a clone for editing?