Event Procedure Code

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

I know that this is a very simple question but I have
tried a number of ways with no luck.

When I click a button in my form it uses an Event
Procedure to select the correct data for the next form.
However in this Event Procedure Code I would like to close
the current form when the new form opens.

So, how do I write that close statement???

For the open statement I have:

DoCmd.OpenForm stDocName, , , stLinkCriteria

I have tried:

DoCmd.CloseForm "Search Results"
CloseForm "Search Results"
DoCmd.CloseForm
CloseForm

Thanks

Nick
 
Hi Nick
Id use something like this in A2k to close the current for

DoCmd.Close acForm, "frmCurrentForm

You could also close the current form when the OnOpen event is triggered in your next form
HT
Anand
 

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

Similar Threads

Form hopping 1
Function call 13
Access Open Form with WhereCondition 6
Search Date using a Inputbox? 2
Open a Form Based on 2 Criteria? 3
fOSUserName 17
Skip Event Procedure if form is null 3
Closing a form with VBA 8

Back
Top