Using frm.Show option
-
Hi, I have some weird problem and being new to VB I have no idea why it does not work. I created a splash form with a login button. With a successful login the code goes frmSplash.Hide frmMain.Show This works, now I am on frmMain.Show. On this form I have 3 command buttons. All I want to do after any command button hit is do frmMain.Hide then i.e. frmAdmin.Show. Well .Show is not available only ShowWhatsThis? I do not get the frmAdmin to display and I have no clue as to why. What did I miss? Thanks samantha :mad:
-
Hi, I have some weird problem and being new to VB I have no idea why it does not work. I created a splash form with a login button. With a successful login the code goes frmSplash.Hide frmMain.Show This works, now I am on frmMain.Show. On this form I have 3 command buttons. All I want to do after any command button hit is do frmMain.Hide then i.e. frmAdmin.Show. Well .Show is not available only ShowWhatsThis? I do not get the frmAdmin to display and I have no clue as to why. What did I miss? Thanks samantha :mad:
I think you'll have to post some code as I can't see how you can be getting the .ShowWhatsThis and not .Show for a Form. How did you create the frmAdmin, using the wizard? If you used the wizard what type of Form did you create? Michael :-)
-
Hi, I have some weird problem and being new to VB I have no idea why it does not work. I created a splash form with a login button. With a successful login the code goes frmSplash.Hide frmMain.Show This works, now I am on frmMain.Show. On this form I have 3 command buttons. All I want to do after any command button hit is do frmMain.Hide then i.e. frmAdmin.Show. Well .Show is not available only ShowWhatsThis? I do not get the frmAdmin to display and I have no clue as to why. What did I miss? Thanks samantha :mad:
-
Hi, I have some weird problem and being new to VB I have no idea why it does not work. I created a splash form with a login button. With a successful login the code goes frmSplash.Hide frmMain.Show This works, now I am on frmMain.Show. On this form I have 3 command buttons. All I want to do after any command button hit is do frmMain.Hide then i.e. frmAdmin.Show. Well .Show is not available only ShowWhatsThis? I do not get the frmAdmin to display and I have no clue as to why. What did I miss? Thanks samantha :mad:
Make 3 forms. 1 called frmSplash 1 called frmMain 1 called frmAdmin --- frmSplash code --- Option Explicit Private Sub Command1_Click() If Text1.Text = "username" And Text2.Text = "password" Then frmMain.Show Unload Me Exit Sub Else GoTo Wrong End If Wrong: If MsgBox("You have entered a wrong username or password.", vbRetryCancel, "My Project") = vbCancel Then Unload frmMain Unload frmAdmin Unload frmSplash Else Text1.Text = "" Text2.Text = "" End If End Sub Private Sub Form_Load() Text1.Text = "" Text2.Text = "" End Sub --- frmMain code --- Option Explicit Private Sub Command1_Click() Load frmAdmin frmAdmin.Show Unload Me End Sub Thankz, Drew
-
Hi, I have some weird problem and being new to VB I have no idea why it does not work. I created a splash form with a login button. With a successful login the code goes frmSplash.Hide frmMain.Show This works, now I am on frmMain.Show. On this form I have 3 command buttons. All I want to do after any command button hit is do frmMain.Hide then i.e. frmAdmin.Show. Well .Show is not available only ShowWhatsThis? I do not get the frmAdmin to display and I have no clue as to why. What did I miss? Thanks samantha :mad:
The reason ".ShowWhatsThis" and no ".Show" happened because you mustn't of called the "form" function. ie: Command1 function has no argument of .Show, closest match is .ShowWhatsThis Thankz, Drew