Application not closing

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

Guest

Hi all,
I have created a form in Access that is completely working
on code, that is, without doing any settings in Access. I
started the new form with the Design View and not the
wizard. After I open this form, I cannot close my
Application. Why is this so? Can anybody help me please?
I have given the code in the Load event of the form as
follows:

Set db = CurrentDb
Set rs = db.OpenRecordset("Main Table", dbOpenDynaset)

and the Unload event as follows:

rs.Close

Please help me fix the error.
Thanks.
 
Hi Dan,
I added the two lines to the Unload event. Still it's the
same. What could be wrong?
Please help.
Thanks.
 
I have had this problem too. Something is still being left 'open'.

1. Make sure that all recordsets are closed and set to nothing within their
reference.
2. Do the same for all querydefs
3. For boolean usage, use 'If blTest = True' versus 'If blTest'

Good Luck,
Andy
 
Back
Top