closing a form

  • Thread starter Thread starter Steven Greenberg
  • Start date Start date
S

Steven Greenberg

Greetings,

I have a form (access 2K) which I open with two calendar controls to select
the starting and ending dates for a query which feeds a report. I've been
trying (unsuccessfully I might add) to have the calendar form close once
the dates are chosen and the report opens up. I've tried putting the
docmd.close "formname" command everywhere, but when I close the report, the
calendar form is still open. Any suggestions for a different method or
maybe a suggestion on where to put this command. It has been in the accept
button of the calendar form, the form load command of the report, the form
close of the report....etc. all with no success. I am quite fluent in VB
and VBA and have created some clever applications, but I can't seem to get
this to work. Any help would be appreciated.
Steve
 
I've used forms like this in the past, and in the click event of the button
to accept the dates and open the report, I close the calendar form by using:
DoCmd.Close acForm, Me.Name, acSaveNo
 
Mark said:
I've used forms like this in the past, and in the click event of the
button to accept the dates and open the report, I close the calendar
form by using:
DoCmd.Close acForm, Me.Name, acSaveNo

Yes all of a sudden, it started working fine. I close the form by name and
it work fine from all other times I've implemented it so far.
 
Back
Top