Hi everyone,
I have an error message in an Access 97 database & I was hoping
someone may be able to help me get rid of it (bearing in mind I only
have an average understanding of Access & absolutely none of VB
coding). Originally, this database was in Access 2003 format. I opened
it in 2003, then used the convert option to back it down to Access 97.
I then opened it in 97. Upon opening, I get this error message:
"compile error: user-defined type not defined". When I click ok, I am
taken to a screen with a window title of "form_switchboa rd", with some
code in it. "Private Sub FillOptions()" is highlighted in yellow, with
an arrow beside it. Just below this is a line "Dim dbs As Database",
with the "dbs As Database" part highlighted in blue. I can then click
on the "end" button on the Access toolbar, & I will be taken back to
the screen which shows the box with the
tables/queries/forms/reports/macros/modules tabs. I have discovered
that removing the switchboard gets rid of the error. Even creating a
new switchboard after removing the original one causes the error
message. All the switchboard consists of is two buttons, one opening a
form in add mode, the other opening it in edit mode. Yet, after
removing the switchboard, I can still open the relevant form without
error, so I'm assuming that somehow, something in the switchboard code
is the problem. So, can anyone tell me what the problem is, & how I
might be able to fix it?
Thanks,
CM 5 6577 eh***********@y ahoo.com (Chris) wrote: Upon opening, I get this error message: "compile error: user-defined type not defined". When I click ok, I am taken to a screen with a window title of "form_switchboa rd", with some code in it. "Private Sub FillOptions()" is highlighted in yellow, with an arrow beside it. Just below this is a line "Dim dbs As Database", with the "dbs As Database" part highlighted in blue.
This switchboard was created using the switchboard add-in. I've never tried
back-pedalling through Access versions but I imagine that an app created in
v2kx will contain lots of code that A97 can't handle. Just a thought
though, try changing "Dim dbs As Database" to "Dim dbs As DAO.Database".
Regards,
Keith.
Database comes from the DAO library. With any module open, select Tools |
References from the menu bar.
You need to ensure that the Microsoft DAO 3.5x Object Library reference is
checked.
While you're there, though, you might as well check whether there are any
other References problems (they're very common when switching versions of
software)
If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.
If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(no e-mails, please!)
"Chris" <eh***********@ yahoo.com> wrote in message
news:bc******** *************** ***@posting.goo gle.com... Hi everyone,
I have an error message in an Access 97 database & I was hoping someone may be able to help me get rid of it (bearing in mind I only have an average understanding of Access & absolutely none of VB coding). Originally, this database was in Access 2003 format. I opened it in 2003, then used the convert option to back it down to Access 97. I then opened it in 97. Upon opening, I get this error message: "compile error: user-defined type not defined". When I click ok, I am taken to a screen with a window title of "form_switchboa rd", with some code in it. "Private Sub FillOptions()" is highlighted in yellow, with an arrow beside it. Just below this is a line "Dim dbs As Database", with the "dbs As Database" part highlighted in blue. I can then click on the "end" button on the Access toolbar, & I will be taken back to the screen which shows the box with the tables/queries/forms/reports/macros/modules tabs. I have discovered that removing the switchboard gets rid of the error. Even creating a new switchboard after removing the original one causes the error message. All the switchboard consists of is two buttons, one opening a form in add mode, the other opening it in edit mode. Yet, after removing the switchboard, I can still open the relevant form without error, so I'm assuming that somehow, something in the switchboard code is the problem. So, can anyone tell me what the problem is, & how I might be able to fix it?
Thanks,
CM
"Douglas J. Steele" <NOSPAM_djsteel e@NOSPAM_canada .com> wrote in message news:<%M******* ***********@new s04.bloor.is.ne t.cable.rogers. com>... Database comes from the DAO library. With any module open, select Tools | References from the menu bar. You need to ensure that the Microsoft DAO 3.5x Object Library reference is checked.
Hi everyone,
Thanks for the replies. I gave both Keith's & Doug's suggestions a go.
Changing the "Dim dbs As Database" to "Dim dbs As DAO.Database" as per
Keith's suggestion didn't work - I just got the same message. I then
tried going into Reference's as Doug suggested. I ticked the Microsoft
DAO 3.51 entry, & then closed & opened the database again. Well, the
original "user-defined" error has now gone, but there is a new error.
Upon opening the database, I get a "run time error 13: type mismatch"
error message. When I click debug, I get the same "form_switchboa rd"
screen as in the original error. This time however, the phrase "Set
rst = dbs.OpenRecords et(strSQL)" is highlighted in yellow (with an
arrow beside it). This is under the same heading as the original error
message (ie "Private Sub FillOptions()") . It seems progress has been
made, but can anyone help me decode this error?
CM
> Thanks for the replies. I gave both Keith's & Doug's suggestions a go. Changing the "Dim dbs As Database" to "Dim dbs As DAO.Database" as per Keith's suggestion didn't work - I just got the same message. I then tried going into Reference's as Doug suggested. I ticked the Microsoft DAO 3.51 entry, & then closed & opened the database again. Well, the original "user-defined" error has now gone, but there is a new error. Upon opening the database, I get a "run time error 13: type mismatch" error message. When I click debug, I get the same "form_switchboa rd" screen as in the original error. This time however, the phrase "Set rst = dbs.OpenRecords et(strSQL)" is highlighted in yellow (with an arrow beside it). This is under the same heading as the original error message (ie "Private Sub FillOptions()") . It seems progress has been made, but can anyone help me decode this error?
Both the ADO and DAO Object models support a Recordset object. I'm
guessing that you have a reference to ADO (Microsoft ActiveX Data
Object 2.x) that appears higher than your DAO reference in your
reference list so without specifying which to use the compiler uses
the first one in the list (ADODB) causing the "type mismatch" error.
You can either remove the ADO reference, move it lower in the list
than the DAO reference or (best solution) declare that you want a DAO
recordset in your code by declaring it as so:
Dim rst As DAO.Recordset
The reason that the DAO. prefix had no effect when declaring the
Database object is that only DAO has a Database object so there was no
ambiguity.
'---------------
' John Mishefske
'--------------- mi****@execpc.c om (almish) wrote in message news:<95******* *************** ****@posting.go ogle.com>... Both the ADO and DAO Object models support a Recordset object. I'm guessing that you have a reference to ADO (Microsoft ActiveX Data Object 2.x) that appears higher than your DAO reference in your reference list so without specifying which to use the compiler uses the first one in the list (ADODB) causing the "type mismatch" error.
You can either remove the ADO reference, move it lower in the list than the DAO reference or (best solution) declare that you want a DAO recordset in your code by declaring it as so:
Dim rst As DAO.Recordset
The reason that the DAO. prefix had no effect when declaring the Database object is that only DAO has a Database object so there was no ambiguity.
Awesome! Thanks John, that did the trick. I wasn't sure where to put
the code that you said would be the best solution, so I simply moved
that ActiveX Data Object one space lower than the DAO Object. I am now
able to open the database without errors, switchboard enabled & all!
:-) I'm not a big database designing person (I have only made 2), so
I'm not sure what (if any) effect this change will have on Access, so
hopefully what I did won't cause any errors in the other database I
made. I have opened it to have a quick check, & all seems ok, so I
will keep my fingers crossed.
Regards,
CM This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sandman |
last post by:
Just looking for suggestion on how to do this in my Web application.
The goal is to keep track of what a user has and hasn't read and present him or
her with new material
I am currently doing this by aggregating new content from all databases into a
single indexed database and then saving a timestamp in the account database
(for the current user) that tells me when the user last read items in the
aggregated database.
|
by: zlst |
last post by:
Many technological innovations rely upon User Interface Design to elevate
their technical complexity to a usable product. Technology alone may not win
user acceptance and subsequent marketability. The User Experience, or how
the user experiences the end product, is the key to acceptance. And that is
where User Interface Design enters the design process. While product
engineers focus on the technology, usability specialists focus on the user...
|
by: Jesper Stocholm |
last post by:
I have implemented role-based security within my ASP.Net application.
However, it seems the role is not passed to the authentication ticket I
create.
I want to use it to display/hide some content based on the user's role. I
wrote this to do it:
if (HttpContext.Current.User.Identity.IsAuthenticated)
{
plLoggedIn.Visible = true;
|
by: Shourie |
last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle.
1) MainPage_load
2) User control1_Load
user clicks a dropdown in UC1
_________________________
1) MainPage_Load
2) User Control_1 Load
|
by: Jiho Han |
last post by:
Should ASPNET user belong to the local Users group?
I may have made some changes that affected my workstation setup and I am
experiencing some unexpected behaviors.
For example, I have my IIS set up with anonymous login and have ASP.NET
running.
My ASP.NET application then creates a log file and writes to it during its
course. The only thing is that it should not be able to.
My questions are below. Please correct any incorrect...
| |
by: tony |
last post by:
Hello!
This is a rather long mail but it's a very interesting one.
I hope you read it. I have tried several times to get an answer to this mail
but I have
not get any answer saying something like this is a bug or that .NET doesn't
support what I
trying to do.
I hope that one that is is microsoft certified read this because this must
be a bug.
|
by: rn5a |
last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with
the IDs 'txt1' & 'txt2' respectively. To use this user control in an
ASPX page, the following Register directive will be required:
<%@ Register TagPrefix="UC" TagName="MyUserCtrl" Src="MyUC.ascx" %>
Assuming that the ASPX page doesn't use a code-behind, I can access the
properties, events etc. of the user control in the ASPX page in this
way (assume that the ASPX page...
|
by: Carlettus |
last post by:
Dear All,
sorry but I'm not sure if this is the right place to post my problem.
I was using the following asp code to create users in Active Directory.
Suddenly, and I don't know the reason, users are created but the account is
disabled (see the flag User.AccountDisabled = False ).
There is also another problem even if the user does not exist , the
application returns to me with the message that the user already exist.
Thank you for...
|
by: rbukkara |
last post by:
Hi,
I have got the following error while trying to add a user in the LDAP Directory.
javax.naming.NameNotFoundException: ; remaining name 'uid=vassila,ou=People,dc=cs,dc=uno,dc=edu'
I have given all the attributes which are needed, for the user, in the code and also the proper path where the user has to be added. Please have a look at my code
CODE]
// This is a class file which stores all the info required for the user
|
by: Gordon |
last post by:
I want to add a feature to a project I'm working on where i have
multiple users set up on my Postgres database with varying levels of
access. At the bare minimum there will be a login user who only has
read access to the users table so that users can log in. Once a user
has been logged in successfully I want to escalate that user's access
level to one appropriate to their role, which will include switching
the postgres user they are...
|
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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
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...
| |