By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,098 Members | 1,918 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,098 IT Pros & Developers. It's quick & easy.

A2003 MIssing Form

P: n/a
Along the lines of my last post, entitled "What Should I Close" the
memory error I got when I was operating my mdb seems to have spawned
something else.

The pop up form, which I presume is the cause of the trouble after
opening and closing it so many times, will no longer open.

It cannot be opened in design view.

When I try to import it into a new database, it doesn't come and I get
table created called "Name AutoCorrect Save Failures" (I don't have
autocorrect on) tells me the failure reason is "Could not open the object"

However, when I go into the original project, I can open the module for
this form.

What on earth have I done?
--
Tim
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Well, I've never seen a table called "Name AutoCorrect Save Failures", but
there are more than a dozen known problems with the Name AutoCorrect feature
in Access. Details in:
Failures caused by Name Auto-Correct
at:
http://members.iinet.net.au/~allenbrowne/bug-03.html

You should be able to recover this database by creating a new one, getting
rid of Name AutoCorrect, and then importing everything. Follow the steps for
the first symptom in:
Recovering from Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-47.html

You may well find that the corruption was the cause for the memory errors
you were experiencing as well.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Tim Marshall" <TI****@antarctic.flowerpots> wrote in message
news:cl**********@coranto.ucs.mun.ca...
Along the lines of my last post, entitled "What Should I Close" the memory
error I got when I was operating my mdb seems to have spawned something
else.

The pop up form, which I presume is the cause of the trouble after opening
and closing it so many times, will no longer open.

It cannot be opened in design view.

When I try to import it into a new database, it doesn't come and I get
table created called "Name AutoCorrect Save Failures" (I don't have
autocorrect on) tells me the failure reason is "Could not open the object"

However, when I go into the original project, I can open the module for
this form.

What on earth have I done?

Nov 13 '05 #2

P: n/a
Allen Browne wrote:
Recovering from Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-47.html

You may well find that the corruption was the cause for the memory errors
you were experiencing as well.


Thanks Allen, no, that didn't work. When I imported the forms, I
selected all, but the form in question did not come over.

It's a small enough form that, with the code from its module which I can
still access, I should be able to rebuild.

With respect to the other question I asked on memory error, would this
have caused a memory leak?

dim dbs as dao.database
dim rst as dao.recordset

set dbs = access.currentdb

<various code including opening and closing rst but no dbs.close>

Exit_Proc:

set rst = nothing
Set dbs = nothing

Should I hve dbs.close in there somewhere?

I've never really closed database variables. I do remember one
application (an oracle front end in Access) which would crap out after a
lot of "on current" procedures were fired from moving from one record to
another in a pass through query. The on current proc involved one or
more DAO procedures, all of which had a database variable, but for which
all I did was set dbs = nothing but never a dbs.close.

The behaviour stopped when I went from a 256 Meg ram machine to my
current 2 Gig ram machine....

--
Tim
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #3

P: n/a
Another alternative for trying to recover a damaged form is the undocumented
SaveAsText and LoadFromText.

Your code looks fine. The rule of thumb is to only close what you open. If
you actually *opened* a database, you should close it, e.g.:
Dim dbData As DAO.Database
Set dbData = OpenDatabase("C:\SomeOtherFile.mdb")
'...
dbData.Close
Set dbData = Nothing
In your case, though, you did not open a database, but merely pointed a
variable at something that was already open, so your code is correct and it
would not be appropriate to close it.

Closing things you did not open can cause problems.
For example, if you code a transaction like this:
Dim ws As DAO.Workspace
Set ws = dbEngine(0)
'...
ws.Close '<= Wrong: you didn't open it!!!
then at this point Access does actually close the database. Then it silently
and automatically reopens it. However, any forms that were open just lost
there RecordsetClone, because that was dependent on the open workspace. So
after that faulty code, attempts to refer to the RecordsetClone of the form
that was already open will result in errors.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Tim Marshall" <TI****@antarctic.flowerpots> wrote in message
news:cl**********@coranto.ucs.mun.ca...
Allen Browne wrote:
Recovering from Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-47.html

You may well find that the corruption was the cause for the memory errors
you were experiencing as well.


Thanks Allen, no, that didn't work. When I imported the forms, I selected
all, but the form in question did not come over.

It's a small enough form that, with the code from its module which I can
still access, I should be able to rebuild.

With respect to the other question I asked on memory error, would this
have caused a memory leak?

dim dbs as dao.database
dim rst as dao.recordset

set dbs = access.currentdb

<various code including opening and closing rst but no dbs.close>

Exit_Proc:

set rst = nothing
Set dbs = nothing

Should I hve dbs.close in there somewhere?

I've never really closed database variables. I do remember one
application (an oracle front end in Access) which would crap out after a
lot of "on current" procedures were fired from moving from one record to
another in a pass through query. The on current proc involved one or more
DAO procedures, all of which had a database variable, but for which all I
did was set dbs = nothing but never a dbs.close.

The behaviour stopped when I went from a 256 Meg ram machine to my current
2 Gig ram machine....

Nov 13 '05 #4

P: n/a
Allen Browne wrote:

Another alternative for trying to recover a damaged form is the undocumented
SaveAsText and LoadFromText.
I'll google this and see what happens.
Your code looks fine. The rule of thumb is to only close what you open. If
you actually *opened* a database, you should close it, e.g.:
Dim dbData As DAO.Database
Set dbData = OpenDatabase("C:\SomeOtherFile.mdb")
'...
dbData.Close
Set dbData = Nothing
In your case, though, you did not open a database, but merely pointed a
variable at something that was already open, so your code is correct and it
would not be appropriate to close it.


OK, thanks. I was always worried that dbs.close (when set dbs =
access.currentdb had been a previous line) might close the actual
database.

As always, I appreciate your time.
--
Tim - http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^
Nov 13 '05 #5

P: n/a
Just try it in the Immediate Window, Tim.

Although undocumented, it's dead easy to use.
It exports an object (such as a form) to a text file, so you can reimport it
into another database.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Tim Marshall" <tm******@morgan.ucs.mun.ca> wrote in message
news:41***************@morgan.ucs.mun.ca...
Allen Browne wrote:

Another alternative for trying to recover a damaged form is the
undocumented
SaveAsText and LoadFromText.


I'll google this and see what happens.

Nov 13 '05 #6

P: n/a
Allen Browne wrote:
Just try it in the Immediate Window, Tim.

Although undocumented, it's dead easy to use.


It certinly is easy, thanks, I'll file that one away up in my head.

Unfortunately, though, for my app, whenever I try it, A2003 shuts down.

It must have gotten corrupted badly somehow before or during the
operation that caused it to vabish. It is close to hallowe'en, after
all, so maybe this is n Access ghost story. 8)
--
Tim
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #7

P: n/a
Tim Marshall <TI****@antarctic.flowerpots> wrote in
news:cl**********@coranto.ucs.mun.ca:
dim dbs as dao.database
dim rst as dao.recordset

set dbs = access.currentdb

<various code including opening and closing rst but no dbs.close>

Exit_Proc:

set rst = nothing
Set dbs = nothing

Should I hve dbs.close in there somewhere?


You can put it in, but it won't do anything, as your variable refers
to the db open in the Access user interface. Since you really don't
want to close that, it's not a good idea to do so.

You *do* want to close your recordset before setting it to Nothing,
though.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.