Hello, I found a previous posting by someone on the 10th Sept ( http://www.thescripts.com/forum/thread705528.html) who seemed to have the same problem as me, but it was never resolved.
I have created a database with many navigation pages which lead to other forms using buttons. Also some forms are populated by combo boxes where you can select the record from a drop down box and it fills that record's details on the form. This all works brilliantly in the normal mode.
However when I made an MDE (as I use Access 2007, but am giving the database to a friend with 2003 so I have been using Access 2007 in 2003 compatibility mode) all the buttons stop working and the combo box no longer populates the forms. I tried making an ACCDE (upgrading to 2007 mode and then converting just to see if it was the MDE making it go wrong) but that also resulted in all the buttons stopping working.
Here is the code for one of the buttons for example: -
Private Sub Go_to_Adult_Maintenance_Form_Click()
-
-
On Error GoTo Err_Go_to_adult_maintenance_form_Click
-
-
Dim stDocName As String
-
-
stDocName = "Child Query"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
-
stDocName = "Adult Query Update"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
-
stDocName = "Household Carer Query"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
-
Dim stLinkCriteria As String
-
-
stDocName = "Adult Navigation Page"
-
DoCmd.OpenForm stDocName, , , stLinkCriteria
-
-
Exit_Go_to_adult_maintenance_form_Click:
-
Exit Sub
-
-
Err_Go_to_adult_maintenance_form_Click:
-
MsgBox Err.Description
-
Resume Exit_Go_to_adult_maintenance_form_Click
-
-
End Sub
-
Please help!
Many many thanks,
Lindsay
10 11482 nico5038 3,080
Recognized Expert Specialist
In general moving a database to another PC can cause Library links to get "lost".
When you have Access installed, open some VBA code (e.g. by pressing [CTRL+G]) and select Tools/References.
Each libraryname starting with "MISSING" must be unchecked and (e.g. microsoft DAO version x.xx) replaced when necessary.
As access doesn't cleanup added libraries, often unnecessary refenreces are present.
Just delete as many as possible without getting an error executing "Debug/compile all modules"
For Access 2007 an additional problem arises with the so-called "trusted locations". You'll need to make a folder (and/or it's subfolders) trusted to allow code to be executed. See the Security section when activating the [Access Options] button on the Officebutton menu.
Nic;o)
Dear Nic;o),
Thanks for your help, but this problem happens on my own PC, so I have not moved PCs. I just convert my fully working .mdb or .accdb into an .mde or an .accde and all the buttons stop working. I have not emailed them the final version as it does not work on my own computer.
I looked in the libraries section you described and there were no missing ones, and I made the location where I store my file "trusted" and that made no difference aswell.
It seems to be a problem created by the "locking" of the database by making it an .mde or an .accde
Do you have any other ideas, as the database is unusable as currently stands, unless I give it to my friend as design editable (and I really don't trust them with that, no offence meant about their PC skills!)
Lindsay
ADezii 8,834
Recognized Expert Expert
Dear Nic;o),
Thanks for your help, but this problem happens on my own PC, so I have not moved PCs. I just convert my fully working .mdb or .accdb into an .mde or an .accde and all the buttons stop working. I have not emailed them the final version as it does not work on my own computer.
I looked in the libraries section you described and there were no missing ones, and I made the location where I store my file "trusted" and that made no difference aswell.
It seems to be a problem created by the "locking" of the database by making it an .mde or an .accde
Do you have any other ideas, as the database is unusable as currently stands, unless I give it to my friend as design editable (and I really don't trust them with that, no offence meant about their PC skills!)
Lindsay
This is reeeeeeeeally a long shot, but try declaring a seperate Variable for each instance of use: - Dim stDocName As String, stDocName2 As String, stDocName3 As String
-
Dim stDocName4 As String
-
-
stDocName = "Child Query"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
-
stDocName2 = "Adult Query Update"
-
DoCmd.OpenQuery stDocName2, acNormal, acEdit
-
-
stDocName3 = "Household Carer Query"
-
DoCmd.OpenQuery stDocName3, acNormal, acEdit
-
-
Dim stLinkCriteria As String
-
-
stDocName4 = "Adult Navigation Page"
-
DoCmd.OpenForm stDocName4, , , stLinkCriteria
nico5038 3,080
Recognized Expert Specialist
Hmm. tested the creation of an .accde on my machine (Using a Dutch version), but had no trouble with the buttons.
What code is executed when starting the first form of the database ?
Nic;o)
FIXED!!!!! When I did the Control G on the .mde file there was no code there at all. So, I saw that there was a compile option on the original .mdb file which I had never done. So when I compiled the code and then made an .mde it worked! Thanks so much I would never have thought about that until you wanted the code executed on the first page. THANK YOU!
nico5038 3,080
Recognized Expert Specialist
In an .mde there will never be code visible as Access will pre-compile the code and use that instead.
Compiling code is always advisable, I do it all the time as it will warn you when you're making mistakes. Moreover, compiling before creating an .mde or converting to another Access version is mandatory.
Glad it's solved,
Success with the application !
Nic;o)
Worked perfectly. Saved a major rewrite. :)
Lindsay Browning has the perfect, easy to us solution.
Try it out. Give her a hug!!!!
NeoPa 32,579
Recognized Expert Moderator MVP
Hi. Thanks for posting. It reminds us all that even threads of ten years old can still be relevant and helpful today.
I'd been contributing less than a year when this thread was started.
It's only a small point, but I always have -
Option Compare Database
-
Option Explicit
-
at the top of every module. That way the compiler reports on undeclared variable and duplicated variables with a procedure.
Phil
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: DH |
last post by:
Hi
Two weeks ago I posted "How to call a VB6 application from windows service application" (on 05/04/04). Thanks for MW's help and it worked. However there is a problem: my VB6 application's connection with network seemed to be blocked
I have a configuration file for the VB6 which pointed to network, \\NetSer1\DataDir\MyinuitFile\.., to get input files. However when the VB6 application tried to access input files through network, it just...
|
by: Razor Works via .NET 247 |
last post by:
I have got a windows service installed through installutil in C#.I have change the login settings from localsystems todomain/user. The user can access the network resources with noproblems but if the windows services can't. Directory.Existreturns false, but true if I use a normal C# windows app.
--------------------------------
From: Razor Works
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
...
|
by: Daniel |
last post by:
limiting access to files with asp.net
is there any way i can make a file only accessible to certain users of my
website? my files are to large to copy to a temp directory and they are of
many types, .exe .xsl .xml etc. i want an href to each file but only allow
users who have the right login-info in their session variable to get to the
files in their directory. is there something built into .net for doing this?
do i need to do some kind...
|
by: PrisNo6 |
last post by:
I have some old code locked in two Access 97 files where I lost the mdw file and the pid do to system crashes. Can someone refer me
to a commercial vendor who can crack these files? - Regards - Kurt
|
by: Mike Gramelspacher |
last post by:
Hello,
I have an Access 2000 database that I copied to a new computer with Access
2003. Access 2003 says the file is in Access 2000 file format. I made some
changes to the Access 2000 file code on the computer with Access 2003, and
compiled. I copied the file back to the Access 2000 machine and the file
runs, but the code is unviewable. Any ideas on why this happens?
Mike G.
| |
by: Jerry J |
last post by:
Hi,
My asp.net application must access a file that can be
anywhere on the server's LAN. I am having a problem
because the server, doesn't have access to files that are
not on the server's local disk. I have done similar
things using COM+ and COM dlls in older versions of asp.
I would have the file access code in a COM dll, run the
dll in COM+, and in COM+, enter a UN and PW that would
have LAN privilege that the COM object would...
|
by: ABC |
last post by:
How can I deny all users directly access image files from images folder?
|
by: Richard Finnigan |
last post by:
Hi
I'm having real difficulties getting a very simple access database file to
show its data in visual studio data controls with various error messages
occuring. I've changed the permissions on the app_data folder for NETWORK
SERVICE.
Inserting a record seems to be particularly difficult though reading from an
Access database seems to be possible at the moment. I've done the obvious
things like using the Advanced SQL Generation...
|
by: mfaisalwarraich |
last post by:
Hi Everybody,
I have installed VertrigoServ 2.21. I am using it on my own computer on a network but now i want to access the files which are in WWW folder from a different computer on the network. I have googled around for this facility and i got to know dat there are two methods one is port forwarding which need access to the router and other is Listen lines in the httpd.conf. As i dont have access to the router and hence i can't forward the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |