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
 
Back
Top