Form Disapering (please Help) 
Author Message
 Form Disapering (please Help)

I have an program that shows a detail form with a text box to enter a driver
name, and check that a name was entered.
My problem is when a name is not entered I show a (OK Cancel box), when I
click ether button it returns me to the main form. I would like it to return
me to the details form with all of the data I have entered up to the point
that I clicked the save button.
Rite now I lose anything that I have entered in the details form.

Here is the code I am using.
Thank You.

Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSave.Click

If Me.txtDriverName.Text = "" Then

MessageBox.Show("You must enter a Driver Name to Save this Record", "No
Driver Name", MessageBoxButtons.OKCancel, MessageBoxIcon.Error)

Else

End If

Exit Sub



Thu, 22 Sep 2005 22:01:23 GMT  
 Form Disapering (please Help)
Try adding Me.Activate after messagebox.show.

Ken


Quote:
> I have an program that shows a detail form with a text box to enter a
driver
> name, and check that a name was entered.
> My problem is when a name is not entered I show a (OK Cancel box), when I
> click ether button it returns me to the main form. I would like it to
return
> me to the details form with all of the data I have entered up to the point
> that I clicked the save button.
> Rite now I lose anything that I have entered in the details form.

> Here is the code I am using.
> Thank You.

> Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles btnSave.Click

> If Me.txtDriverName.Text = "" Then

> MessageBox.Show("You must enter a Driver Name to Save this Record", "No
> Driver Name", MessageBoxButtons.OKCancel, MessageBoxIcon.Error)

> Else

> End If

> Exit Sub



Thu, 22 Sep 2005 23:37:21 GMT  
 Form Disapering (please Help)
Hello,


Quote:
> I have an program that shows a detail form with a
> text box to enter a driver name, and check that a
> name was entered.
> My problem is when a name is not entered I
> show a (OK Cancel box), when I click ether button
> it returns me to the main form. I would like it to return
> me to the details form with all of the data I have
> entered up to the point that I clicked the save button.

Use the form's ShowDialog method to display it modally on the
application's main form. Then, the active dialog should get activated.

You can make a call to Me.Activate() after displaying the message box
when showing the detail forms using its Show method.

Regards,
Herfried K. Wagner



Fri, 23 Sep 2005 05:36:59 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

2. Can anyone HELP me PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE

3. Disapering time and date stamps Crystal 7.0

4. PLEASE HELP PLEASE HELP PLEASE HELP

5. Please help: record from form to form

6. Please help: record from form to form

7. Please help: record from form to form

8. Design Help PLEASE PLEASE PLEASE!

9. Please Please PLEASE HELP!!!!!

10. URGENT HELP PLEASE PLEASE PLEASE???

11. Please please please, help me :-)

12. Please, Please, Please I need help working with dates

 

 
Powered by phpBB® Forum Software