Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbe Question: Reguarding Forms

Status
Not open for further replies.

obliviux

Programmer
Jun 2, 2000
38
US
What is the command to call a form from an existing one?

I thought it was "ShowWindow" or "ShowForm" but these dont work.


thanks,

Jeremy [sig][/sig]
 
Jeremy,
Try this code, but replace "NewForm" with the name of the form you want to show. This is usually used when a command button on the first form is clicked. (You can also call the routine anything you want, but I usally use a meaningful name)

Private Sub CmdShowNewForm_Click()

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "NewForm"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_CmdShowNewForm_Click:
Exit Sub

End Sub

BMeek
[sig]<p>Bryan Meek<br><a href=mailto:bmeek@pacbell.net>bmeek@pacbell.net</a><br><a href= Enterprises - Personal Technology Consultant</a><br>A TC in your corner gives you the personal attention you need to find the right technology solutions for your business.[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top