Hi everyone,

I have a form open (UpdateResponse) and the user wants to update a datagrid. So they click on a button to update the datagrid (and the database) and then they receive a message (ResponseUpdateConfirmation), which is another form, telling them that the update was successful. I want to show this message over the original form so that the user can see the datagrid being updated beneath the message. This all works.

But then I want the user to click "Continue" on the pop-up message form after which I want the original form (UpdateResponse) to close and a new form (CadLogIn) to open (and the confirmation message to close). And no matter what I try, when the user presses continue, the confirmation message form will close and the new form will open. But the original form still stays open!

This is my code on the continue button click (the button on the ResponseUpdateConfirmation message form):

UpdateResponse.Close()
    Me.Hide()
    CadLogIn.Show()

Can anyone see why it won't close the original form?

Thanks,

Amy

Recommended Answers

All 3 Replies

How many forms are you dealing with therefore in this situation?

In this particular section, there are 3 forms. But in the whole program, there are over 20 forms.

I think you need to use the CadLogIn form to control the other forms since its the one you want to finally have. Tried that? Maybe not.

Let the CadLogIn form load and hide it.
Then after hiding it, let it show the UpdateResponse form, so that when the user clicks continue on the pop up, close the Update Response form and Show the CadLogIn Form.
Try that, it surely works.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.