Submit Button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a submit button that saves my data to a database. I would also like
the same click event to send the user to a "Thank You" page. How do I do
this?
 
Do you mean "Thank you" page(ADP) or "Thank you" form?
Suposing that you want to use form named "Thank you" and that submit
button is named cmdSubmit then the code should be like this:

Private Sub cmdSubmit_Click()
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenForm "ThankYou"
End Sub

Regards,

Mirnes Lemes
 
OK, what I'm actually using is Visual Studio so what I was hoping to get was
the html code. My button is calling the function that saves the data from
the form page then I want it to open the Thank You page. It looks like this:
Try
InsertDataIntoDB()
Catch ex As Exception
Throw New Exception("", ex)
End Try
 
Then you should post your question to some other group because this
group is about MS Access. Try search for Visual Studio groups.

Regards,
 
Sorry, I ghought I clicked on "Front Page". I didn't see one for Visual
Studio. Sorry to bother...
 
When I use regular ASP I place my Thank you at the end of my code either on
the same page if my coding is within my ASP page or I post to another ASP
page with my Thank You information.
<form action="ExcavatorDirectMailPrg.asp" method="post">

If you using ASP.Net with VB or C#?
I believe when usng VB or C# you can add an action statement that still
sends your results to your database, but then activates the page you call in
that action statement as seen above.

ASP.Net usually leaves the action statement out because it post back to
itself. You can add your Thank you Info after the end form statement in your
current page also.
 
Thank you!

G. Vaught said:
When I use regular ASP I place my Thank you at the end of my code either on
the same page if my coding is within my ASP page or I post to another ASP
page with my Thank You information.
<form action="ExcavatorDirectMailPrg.asp" method="post">

If you using ASP.Net with VB or C#?
I believe when usng VB or C# you can add an action statement that still
sends your results to your database, but then activates the page you call in
that action statement as seen above.

ASP.Net usually leaves the action statement out because it post back to
itself. You can add your Thank you Info after the end form statement in your
current page also.
 
WendyWest said:
Sorry, I ghought I clicked on "Front Page". I didn't see one for Visual
Studio. Sorry to bother...

There definitely are Microsoft-sponsored newsgroups about Visual
Studio --Visual Basic.NET, C#, and other topics. And, definitely, the
FrontPage newsgroup is not where you turn for Visual Studio answers.

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top