Forms will not open - Unknown Function Name error

J

Jan Il

Hi all - Access 2002 XP, WinME

I have two forms that will not open, the error being Unknown Function Name.
I just accessed these forms as of 2/4/04 with no problems.

I have a command button on a filter form for each both, which opens the
forms. When I click the command button to open a form, it gives the error
message. Plus, when I close out the error message by clicking OK, it
automatically opens the filter form for the data entry. ?????

Here are the Troubleshooting steps I have already taken:

a) Check table the queries are based on - Both open with no problems, are in
good order.
be) Checked to be sure form references were still set - All is still in
order.
co) Queries will not open - Error message - Unknown Function Name
do) Did a Detect and Repair
e) Created a new db and imported all data into the new db - problem
persists.
if) Tried a backup copy - Error message - Unknown Function Name
go) Tried a 3 month old backup copy, which worked find previously - Error
message - Unknown Function Name
he) Said....Ohhhhh PHOOH!!

Listed below are the queries the forms are based on:
********************************************************
Query1
SELECT T.BeginBal, T.CheckNo, T.CheckDate, T.Transaction, T.CheckAmt,
T.DepositAmt, T.TransactionType, T.Comment, (SELECT SUM(Nz(DepositAmt, 0) -
Nz(CheckAmt, 0) + Nz(BeginBal,0))
FROM MyCheckRegister T1
WHERE T1.CheckDate <= T.CheckDate) AS RunningBalance
FROM MyCheckRegister AS T
ORDER BY T.CheckNo, T.CheckDate;

Query2
SELECT MySavingsRec.TransactionDate, MySavingsRec.TransactionType,
MySavingsRec.WithdrawAmt, MySavingsRec.DepositAmt, MySavingsRec.InterestAmt,
(SELECT SUM(Nz(DepositAmt, 0) + Nz(InterestAmt,0) - Nz(WithdrawAmt, 0) +
Nz(BeginBal,0))
FROM MySavingsRec
WHERE TransactionDate <= TransactionDate) AS Balance,
MySavingsRec.Comment, MySavingsRec.BeginBal, MySavingsRec.TransactionSign
FROM MySavingsRec
ORDER BY MySavingsRec.TransactionDate;
*******************************************************************
Based upon the fact that the much previous backup copy, which had worked
perfectly at the time of the backup, and the other recent backup, from the
last time I accessed the database and it was working fine, and the fact that
the problem persists even to the new database, seems to indicate to me (and,
being I am a novice here, so am not sure on any of this), that the problem
may not be with the database at all, but some other factor. That factor, not
being known to me.

I would truly appreciate any information, references or input regarding this
type of problem.

Best regards,
Jan :)
 
J

Jan Il

Hi Allen,

Allen Browne said:
Jan, with a bit of luck this may be just a reference problem.

Press Ctrl+G to open the Immediate Window.
Choose References on the Tools menu.
Look for any marked "MISSING".

More information:
http://allenbrowne.com/ser-38.html

I have checked the References, and all are in order. And I have the DAO 3.6
Object Library in the list checked.

I had first thought perhaps it was that my forms had become corrupt, but, as
the queries they are based on will not open as well, it rather makes me
think that is might not be the forms. Strange that it is the two record
forms. The entry forms are fine. And all other forms and queries are fine. I
also thought perhaps it was a syntax situation in the queries, but, I was
just in the forms a couple of weeks ago and all was functioning fine.

It seems to be related to the two queries, or, as least as I can determine.
But, not being that experienced in this area, I really can't tell for sure.

Thank you very much for your time and help, I truly do appreciate it.

Jan:)
 
A

Allen Browne

The queries make function calls.
The message is about invalid functions.
So, the question is, Why can't Access interpret the functions from the
query?

Does the application compile okay?
Is there anything else that could be causing a naming clash?

Try unchecking the DAO library (and any others except the required VBA and
Access references). Then re-register the libraries at the command prompt,
e.g.:
regsvr32 "c:\program files\common files\microsoft shared\dao\dao360.dll"
Then, after re-registering, select the DAO reference again.

It sounds more like references than corruption, as the old copies fail also.
 
J

Jan Il

Hi Allen,

Comments inline, if I may:
The queries make function calls.
The message is about invalid functions.
So, the question is, Why can't Access interpret the functions from the
query?

Does the application compile okay?
Is there anything else that could be causing a naming clash?

Yes, the application does compact and compile without any errors or yelps. I
have it set to compact and compile on close. I don't go into it every day,
as it is for my personal use, so it is not a very active application.

I have changed nothing since the last time I entered the data, and all was
working fine then. I don't know of anything that might be causing the naming
clash, and not sure where I should look other than where I have already. The
table that the two queries are based upon opens fine. But, even if the error
is there, it probably would still open. I have looked at the structure of
the queries, and the tables, to see if there was something there that may be
causing the problems.

I have also tried to open the forms direct, bypassing the command buttons
that open them, and I recreated the Macro for the command buttons as well
just to be sure there was no problem in that area.
Try unchecking the DAO library (and any others except the required VBA and
Access references). Then re-register the libraries at the command prompt,
e.g.:
regsvr32 "c:\program files\common files\microsoft shared\dao\dao360.dll"
Then, after re-registering, select the DAO reference again.

I did all of the steps above in reference to the library registries I could
find or could uncheck. I made a copy of the list before unchecking anything
to be sure I got everything back in order.

The only References I have/had checked are, in the order listed:

Visual Basics For Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library
Microsoft DAO 3.6 Object Library

Is there perhaps something else that I should add?
It sounds more like references than corruption, as the old copies fail
also.

What somewhat puzzles me is the behavior after I click OK on the error
message box. It either jumps to another unrelated form, or to the last place
I was; as when I went to try to open the queries. When I now click the OK it
jumps direct to the last query I tried to open. Why it does this instead of
remaining on the filter form after the error message is closed is something
I don't understand at all. I've never encountered anything like this before.
It certainly makes troubleshooting more difficult and confusing.

I also redid the Add New Features from the Add/Remove Program, to make sure
that nothing had somehow gotten changed there. Although no changes to
anything had been made intentionally, and there was no error saying that
anything was unavailable or could not be found. All appeared to be as it
should be, but, I just made sure by redoing everything.

The fact that it happens even with archive copies, in which data older, also
leads me to believe that it is not corruption. Also, if it was only one
form, or one query that would not open I could think it might be corruption,
but, the fact that both of these queries will not open with the same error
seems to discount that being the cause. But, I don't know what much about
that area of Access.

Thank you very much for your time and help, I really appreciate it.

Jan :)
 
D

Dirk Goldgar

Jan Il said:
Hi all - Access 2002 XP, WinME

I have two forms that will not open, the error being Unknown Function
Name. I just accessed these forms as of 2/4/04 with no problems.

I have a command button on a filter form for each both, which opens
the forms. When I click the command button to open a form, it gives
the error message. Plus, when I close out the error message by
clicking OK, it automatically opens the filter form for the data
entry. ?????

Here are the Troubleshooting steps I have already taken:

a) Check table the queries are based on - Both open with no problems,
are in good order.
be) Checked to be sure form references were still set - All is still
in order.
co) Queries will not open - Error message - Unknown Function Name
do) Did a Detect and Repair
e) Created a new db and imported all data into the new db - problem
persists.
if) Tried a backup copy - Error message - Unknown Function Name
go) Tried a 3 month old backup copy, which worked find previously -
Error message - Unknown Function Name
he) Said....Ohhhhh PHOOH!!

Listed below are the queries the forms are based on:
********************************************************
Query1
SELECT T.BeginBal, T.CheckNo, T.CheckDate, T.Transaction, T.CheckAmt,
T.DepositAmt, T.TransactionType, T.Comment, (SELECT
SUM(Nz(DepositAmt, 0) - Nz(CheckAmt, 0) + Nz(BeginBal,0))
FROM MyCheckRegister T1
WHERE T1.CheckDate <= T.CheckDate) AS RunningBalance
FROM MyCheckRegister AS T
ORDER BY T.CheckNo, T.CheckDate;

Query2
SELECT MySavingsRec.TransactionDate, MySavingsRec.TransactionType,
MySavingsRec.WithdrawAmt, MySavingsRec.DepositAmt,
MySavingsRec.InterestAmt, (SELECT SUM(Nz(DepositAmt, 0) +
Nz(InterestAmt,0) - Nz(WithdrawAmt, 0) + Nz(BeginBal,0))
FROM MySavingsRec
WHERE TransactionDate <= TransactionDate) AS Balance,
MySavingsRec.Comment, MySavingsRec.BeginBal,
MySavingsRec.TransactionSign FROM MySavingsRec
ORDER BY MySavingsRec.TransactionDate;
*******************************************************************
Based upon the fact that the much previous backup copy, which had
worked perfectly at the time of the backup, and the other recent
backup, from the last time I accessed the database and it was working
fine, and the fact that the problem persists even to the new
database, seems to indicate to me (and, being I am a novice here, so
am not sure on any of this), that the problem may not be with the
database at all, but some other factor. That factor, not being known
to me.

I would truly appreciate any information, references or input
regarding this type of problem.

Jan -

Did you by any chance do a WindowsUpdate or OfficeUpdate that installed
a new version of Jet, Jet SP8 perhaps?
 
J

Jan Il

Hi Dirk,

"> > Hi all - Access 2002 XP, WinME
Jan -

Did you by any chance do a WindowsUpdate or OfficeUpdate that installed
a new version of Jet, Jet SP8 perhaps?

Yes, I did do a WindowsUpdate a few days ago, after I had to reinstall
Windows ME (again), and then had to redo all the updates. However, I have
not done a new OfficeUpdate thus far. According to the Help About Access,
this is what I now have: MS Access 2002 (10.4302.4219) SP2.

Thank you for your help.

Jan :)
 
D

Dirk Goldgar

Jan Il said:
Yes, I did do a WindowsUpdate a few days ago, after I had to reinstall
Windows ME (again), and then had to redo all the updates. However, I
have not done a new OfficeUpdate thus far. According to the Help
About Access, this is what I now have: MS Access 2002 (10.4302.4219)
SP2.

Jan -

The first thing I'd try would be reregistering DAO, as Allen Browne
suggested -- it wasn't clear to me from your reply to him whether you
had done that or not. You could do it by opening a command prompt and
enter a command line like the following:

regsvr32 "c:\program files\common files\microsoft
shared\dao\dao360.dll"

You may have to search your system first to find the correct folder path
for the latest version of the dao.360.dll file (there could be multiple
versions on your system).

If that doesn't solve your problem, have a look at this KB article on
the Jet Sandbox Mode:

http://support.microsoft.com/default.aspx?scid=kb;en-us;294698

Use the Registry Editor (Start -> Run -> regedit) to check your registry
for the "SandboxMode" key, as instructed by that article, and see if
changing that setting makes a difference.
 
J

Jan Il

Hi Dirk,

"> >> Did you by any chance do a WindowsUpdate or OfficeUpdate that
Jan -

The first thing I'd try would be reregistering DAO, as Allen Browne
suggested -- it wasn't clear to me from your reply to him whether you
had done that or not. You could do it by opening a command prompt and
enter a command line like the following:

regsvr32 "c:\program files\common files\microsoft
shared\dao\dao360.dll"

You may have to search your system first to find the correct folder path
for the latest version of the dao.360.dll file (there could be multiple
versions on your system).

If that doesn't solve your problem, have a look at this KB article on
the Jet Sandbox Mode:

http://support.microsoft.com/default.aspx?scid=kb;en-us;294698

Use the Registry Editor (Start -> Run -> regedit) to check your registry
for the "SandboxMode" key, as instructed by that article, and see if
changing that setting makes a difference.

Yes, I did try the re-registry of the DAO as Allen suggested, but, the
problem continued.

'k..I've followed the instructions of the Q294698 for the Sandbox Mode, and
I have reset it from 3 to 0 (zero), as according to the instructions, as I
understand them, the zero is the most permissive, and the least permissive.
In that I also use VBA in some of my PowerPoint, Word and Excel projects, I
wanted to be sure they were included as well.

While it does seem to have resolved the problem, as the queries and forms
are now opening and functioning as they should, I am not sure if the zero is
the proper setting or not. However, 1 was for Access applications but not
others, and 2 was for other applications but not Access. So...ahmm...I chose
zero sort of as a process of elimination. <g>

I did some other checking with some of the other apps before I changed
anything, and I did not experience any the problem with any of the others.
It must have had something to do with the makeup of this particular app
structure for some reason. Odd...it is the smallest, simplest one of them
all. ;-))

All seems well at this point, so I will monitor and see if there are any
other

Thank you very much for your help, I really do appreciate it.

Jan :)
 
D

Dirk Goldgar

Jan Il said:
'k..I've followed the instructions of the Q294698 for the Sandbox
Mode, and I have reset it from 3 to 0 (zero), as according to the
instructions, as I understand them, the zero is the most permissive,
and the least permissive. In that I also use VBA in some of my
PowerPoint, Word and Excel projects, I wanted to be sure they were
included as well.

It's not VBA being restricted here, it's the Jet database engine. So
you'd only need to be concerned if were performing database operations
in your other projects.
While it does seem to have resolved the problem, as the queries and
forms are now opening and functioning as they should, I am not sure
if the zero is the proper setting or not. However, 1 was for Access
applications but not others, and 2 was for other applications but not
Access. So...ahmm...I chose zero sort of as a process of elimination.
<g>

If it was set to 3 before -- "Use sandbox mode at all times" -- I'd
suggest that you set it to 2 ("Use sandbox mode only for non-Access
applications") and see if this database and your other applications all
run as they should.
I did some other checking with some of the other apps before I changed
anything, and I did not experience any the problem with any of the
others. It must have had something to do with the makeup of this
particular app structure for some reason. Odd...it is the smallest,
simplest one of them all. ;-))

Presumably you're using one of the restricted functions somewhere, but
it isn't obvious where.
 
J

Jan Il

Hi Dirk,

Comments inline:
It's not VBA being restricted here, it's the Jet database engine. So
you'd only need to be concerned if were performing database operations
in your other projects.

Ohhhh. *That* Jet...:))
If it was set to 3 before -- "Use sandbox mode at all times" -- I'd
suggest that you set it to 2 ("Use sandbox mode only for non-Access
applications") and see if this database and your other applications all
run as they should.

I have done this and thus far all Access applications appear to be running
properly.
Presumably you're using one of the restricted functions somewhere, but
it isn't obvious where.

It would seem so, but, I have no idea where it might be. There's really not
that much to it. It's pretty short and to the point. At least this seems to
have resolved the problem, so, hopefully, they will all play nice with the
new Sandbox. <g>

Thank you very much for all your help, I really do appreciate it. Another
new reference for my library. :)

Jan :)
 

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

Top