Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can't find the name ' DBEngine '   (Or DBCurrent)  you entered in the expression

Posted on 2007-12-05
7
Medium Priority
?
725 Views
Last Modified: 2008-02-01
Can't find the name 'CurrentDb' you entered in the expression

I have an application I am trying to deploy,
I have created a startup script to load the compiled MDE Access application, Access runtime and the tables.
I have run the startup on three of my computers and it loads and runs.
I have deleted the application and tables from one pc ant=d the startup loaded the application and it ran.

I deployed it to a family's pc.  it loads .
the macro looks for a file and if it cant find it asks for the file with the table.
IT finds it and loads some tables.
In the macro I have a test for the startup application title
  Condition                                                                                  Action
[CurrentDb].[Properties]("AppTitle")="EULA Agreement"      OpenForm

This works on all my pc's.

On my family's pc , which has never run the app before, and on a friemds pc I get the error

EULA Agreement can't find the name 'CurrentDb' you entered in the expression.
You may have specified a control that wasn't on the current object without specifying the current form or report control.

I set the flag in the Startup screen application name then change it when the EULA is read.

Even if I change it manually to skip the agreement form it still gives me the message except now it has the application name instead of EULA Agreement.

SO I am thinking that it is the reference to DBCurrent in the macro.   How can I read the application name without using DBcurrent?
I tried  DBEngine(0)(0).Properties("AppTitle") = "EULA Agreement" but the macro says it can't parse the expression

I used [DBEngine].[Workspaces](0).[Databases](0).[Properties]("AppTitle") = &
And I get the Error.

Can't find the name ' DBEngine ' you entered in the expression.

Now what???

Don
0
Comment
Question by:donaldmaloney
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 20412353
in the immediate window type the following

?currentdb.properties("Apptitle")

see what is the returned value
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 20412393
also check in the references if you have MISSING: reference name

possibly a DAO version
0
 
LVL 11

Author Comment

by:donaldmaloney
ID: 20412513
Answers to all 3  in access 2000

? [CurrentDb].[Properties]("AppTitle")
RFP Manager

? [DBEngine].[Workspaces](0).[Databases](0).[Properties]("AppTitle")
RFP Manager

? currentdb.properties("Apptitle")
RFP Manager

This is a compiled app  ---->   mde
Included is access runtime which loads in the startup script.

A copy of the startup is in http://www.orbitfiles.com/     user name  is the same as mine here
Password for this file is  vader     file size is 99 MB.
App is in Beta testing and is time dependent   will not work after 2/1/08
Don

0
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
LVL 11

Author Comment

by:donaldmaloney
ID: 20412523
No missing references  I have looked.
0
 
LVL 11

Accepted Solution

by:
donaldmaloney earned 0 total points
ID: 20447774
For some reason or other MAcro deoes not like the direct referem=nce to CurrentDB  or DbEngine.

So I put it in a module and call the module from the macro.

All works  really wierd.

Function modCheckforTableName(strApplTitleName As String) As Boolean
            ' See if the DB Table exists as the first table in the DB
Dim db As Database 'Database to import
Dim td As TableDef 'Tabledefs in db
Set dbCurrent = CurrentDb
modCheckforTableName = False
   If [CurrentDb].[TableDefs](0).[Name] = strApplTitleName Then
      modCheckforTableName = True
    Exit Function
    End If
End Function

THis works and I pass through the macro OK.
0
 
LVL 1

Expert Comment

by:Vee_Mod
ID: 20516370
Closed, 500 points refunded.
Vee_Mod
Community Support Moderator
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question