I installed Office 2000 Professional onto a Windows Vista laptop and when I tried to compile the code the following error message appears:
'User-Defined type not defined'
I went to check the registry and the following message appears:
'Error accessing the system registry'.
I have tied to repair Access using the Office 2000 repair facility but no luck.
Do you have any suggestions on this problem.
Thank you
7 13629 ADezii 8,834
Recognized Expert Expert
I installed Office 2000 Professional onto a Windows Vista laptop and when I tried to compile the code the following error message appears:
'User-Defined type not defined'
I went to check the registry and the following message appears:
'Error accessing the system registry'.
I have tied to repair Access using the Office 2000 repair facility but no luck.
Do you have any suggestions on this problem.
Thank you
Post the code that you were attempting to compile.
I forgot to mention that error occurs when I try to look at the references in the Visual Basic window.
Here is a sample of the code. There is no problem with it on an XP laptop. -
Option Compare Database
-
Option Explicit
-
-
Private Sub cboProperty_AfterUpdate()
-
-
Me.cboFlat.Requery
-
-
End Sub
-
-
Private Sub cmdClose_Click()
-
-
On Error GoTo Err_cmdClose_Click
-
-
DoCmd.OpenForm "frmMainMenu", acNormal
-
DoCmd.Close acForm, "frmReports"
-
-
Exit_cmdClose_Click:
-
Exit Sub
-
-
Err_cmdClose_Click:
-
MsgBox Err.Description
-
Resume Exit_cmdClose_Click
-
-
End Sub
-
-
Private Sub cmdLabelP1_Click()
-
-
-
DoCmd.OpenReport "rptOwners_Labels", acViewPreview
-
DoCmd.RunMacro "mrToolbar.ShowPrintTool"
-
End Sub
-
-
Private Sub cmdLabelP2_Click()
-
-
DoCmd.OpenReport "rptOwners_Labels_P2", acViewPreview
-
DoCmd.RunMacro "mrToolbar.ShowPrintTool"
-
End Sub
-
-
Private Sub cmdPrint_Click()
-
-
Dim Msg As String, Msg2 As String, Response As String, Style As String
-
-
Msg = "There are no Arrears for " & "" & Forms![frmReports].[cboProperty].Column(1)
-
Style = vbOKOnly + vbInformation + vbDefaultButton1
-
-
Msg2 = "There are no Outstanding Actions for " & "" & Forms![frmReports].[cboProperty].Column(1)
-
-
On Error GoTo Err_cmdPrint_Click
-
-
If Me.lstReports = "rptInvoice" Then
-
DoCmd.SetWarnings False
-
DoCmd.OpenQuery "qupdInvoicesPrinted"
-
DoCmd.SetWarnings True
-
End If
-
-
If Me.lstReports = "rptServiceChargeArrearsRpt" Then
-
DoCmd.SetWarnings False
-
DoCmd.OpenQuery "qdelServiceChargeArrearsTotal"
-
DoCmd.OpenQuery "qappServiceChargeASrrearsTotalCY"
-
DoCmd.OpenQuery "qappServiceChargeASrrearsTotalPY"
-
DoCmd.SetWarnings True
-
End If
-
-
If Me.lstReports = "rptInvoiceArrears" And IsNull(DLookup("[PropertyID]", "qselInvoicesArrearsRpt")) Then
-
Response = MsgBox(Msg, Style)
-
If Response = 1 Then
-
GoTo 10
-
End If
-
End If
-
-
If Me.lstReports = "rptGroundRentArrears" And IsNull(DLookup("[PropertyID]", "qselGroundRentArrears")) Then
-
Response = MsgBox(Msg, Style)
-
If Response = 1 Then
-
GoTo 10
-
End If
-
End If
-
-
If Me.lstReports = "rptPropertyActions" And IsNull(DLookup("[PropertyID]", "qselPropertyAction")) Then
-
Response = MsgBox(Msg2, Style)
-
If Response = 1 Then
-
GoTo 10
-
End If
-
End If
-
'rptPropertyActions
-
DoCmd.OpenReport Me.lstReports, acViewPreview
-
DoCmd.RunMacro "mrToolbar.ShowPrintTool"
-
-
10
-
-
Exit_cmdPrint_Click:
-
Exit Sub
-
-
Err_cmdPrint_Click:
-
MsgBox Err.Description
-
Resume Exit_cmdPrint_Click
-
-
End Sub
-
-
-
-
Private Sub Command17_Click()
-
-
DoCmd.OpenReport "rptOwners_Labels_FH_P2", acViewPreview
-
DoCmd.RunMacro "mrToolbar.ShowPrintTool"
-
End Sub
-
-
Private Sub Command18_Click()
-
-
DoCmd.OpenReport "rptOwners_Labels_FH_P1", acViewPreview
-
DoCmd.RunMacro "mrToolbar.ShowPrintTool"
-
End Sub
-
-
Private Sub Form_Open(Cancel As Integer)
-
On Error GoTo Err_Form_Open
-
-
DoCmd.Maximize
-
-
Me.cboFlat.Visible = False
-
Me.cboProperty.Visible = False
-
Me.cboYear.Visible = False
-
Me.cboHalfYear.Visible = False
-
-
Exit_Form_Open:
-
Exit Sub
-
-
Err_Form_Open:
-
MsgBox Err.Description
-
Resume Exit_Form_Open
-
-
End Sub
-
-
Private Sub lstReports_Click()
-
-
If Me.lstReports = "rptContactProperty" Or Me.lstReports = "rptBillExtraInvoice" Then
-
Me.cboFlat.Visible = True
-
Me.cboProperty.Visible = True
-
Else
-
Me.cboFlat.Visible = False
-
Me.cboProperty.Visible = False
-
End If
-
-
If Me.lstReports = "rptInvoiceArrears" Or Me.lstReports = "rptPropertyActions" Or Me.lstReports = "rptInvoiceDetails" Or Me.lstReports = "rptOwners" Or Me.lstReports = "rptInvoice_Phase2" Then
-
Me.cboProperty.Visible = True
-
End If
-
-
If Me.lstReports = "rptInvoice" Or Me.lstReports = "rptInvoiceRedecWindows" Or Me.lstReports = "rptInvoiceRedecoration" Then
-
Me.cboProperty.Visible = True
-
Me.cboYear.Visible = True
-
Else
-
Me.cboYear.Visible = False
-
End If
-
-
If Me.lstReports = "rptInvoiceReprint" Then
-
Me.cboFlat.Visible = True
-
Me.cboProperty.Visible = True
-
Me.cboYear.Visible = True
-
Else
-
'Me.cboYear.Visible = False
-
End If
-
-
If Me.lstReports = "rptGroundRentInvoice" Or Me.lstReports = "rptGroundRentArrears" Then
-
Me.cboHalfYear.Visible = True
-
Me.lblHalfYear.Visible = True
-
Me.cboYear.Visible = True
-
Else
-
Me.cboHalfYear.Visible = False
-
Me.lblHalfYear.Visible = False
-
Me.cboYear.Visible = False
-
End If
-
-
End Sub
-
Thank you for your help in this matter. I am not a experienced programmer, I try an learn as I go along.
Denburt 1,356
Recognized Expert Top Contributor
The code appears to be o.k. from what I can see. When you get the error message is there a button called "debug" if so click this and tell us what line it is on.
'User-Defined type not defined'
FYI, I know your version is 2000 but have heard that MS Access 2007 is much more restrictive in the syntax department than previous versions. Although many people disagree for one reason or another the correct way to refer to a control is Me!ControlName. Me.Controlname can be quite quirky I have found this to be an issue for me in the past with older versions of Access. Just an idea.
According to Microsoft one thing MS Access will not like in Access 2007 is if you use a boolean as such.
If myBool then
Microsoft states that in 2007 you will need the complete statement.
If myBool = True then
ADezii 8,834
Recognized Expert Expert
I installed Office 2000 Professional onto a Windows Vista laptop and when I tried to compile the code the following error message appears:
'User-Defined type not defined'
I went to check the registry and the following message appears:
'Error accessing the system registry'.
I have tied to repair Access using the Office 2000 repair facility but no luck.
Do you have any suggestions on this problem.
Thank you
- The Style and Response Variables are Declared as String which is incorrect, they shoud be declared as Integers, namely:
- Dim Msg As String, Msg2 As String, Response As String, Style As String
-
'SHOULD BE
-
Dim Msg As String, Msg2 As String, Response As Integer, Style As Integer
-
- GoTo Line Number, except in Error Trapping, is usually never a good idea to use. It is only supported for backward compatibility and may not even be supported in 2007. Check on this.
Thank you for your prompt reply,
The problem is on a friend's laptop and I do not have access to it this week. From memory when I ran compile the error starts on the first DIM statement.
When I select Tools/References in the Microsoft Visual Basic window the
"Error accessing the system registry" message appears.
The database runs fine on my XP laptop.
I hope this is of help.
Denburt 1,356
Recognized Expert Top Contributor
It is als nevera goog idea to use a single word for variables you might find yourself bumpininto keywords especially since they can change from version to version.
instead of:
Dim Msg As String, Msg2 As String, Response As Integer, Style As Integer
I would use:
Dim Msg As String, Msg2 As String, intResponse As Integer, strStyle As Integer
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Wanda |
last post by:
Hi there,
I am getting a Error accessing the OLE registry when the system goes
hit the following line
set xWd = Server.CreateObject("Word.Application")
in my asp?
Anything I have to set-up in order to remove this error...
|
by: CLarkou |
last post by:
While trying to register MSFLXGRD.OCX with REGSVR32 I got an error
(8002801C) which means "error accessing the OLE registry".
MSFLXGRD.OCX as COMDLG32 depend on OLE32.DLL & OLEAUT32.DLL. Since
COMDLG32 was registered without any problem, what could be the cause ?
|
by: Jody Gelowitz |
last post by:
This one should be relatively simple, though I have yet to figure it out. I
have an ASP.NET project which uses LDAP authentication to login to the
system. When run on our Development or Staging servers, the authentication
works great! When running the project on my local computer under
\\localhost, I get the following error:
System.Runtime.InteropServices.COMException (0x8002801C): Error accessing
the OLE registry
at...
|
by: mark.jerrom |
last post by:
I'm fairly new to this Web Service game so please feel free to suggest
something different if it looks like i'm completely off track!
I'm trying to write an application that runs on a Pocket PC that is
accessing data stored in a SQL server database on a seperate server
(not on the pocket pc). This wil be deployed to lots of customers sites
so I can't hard-code the location of the database in the program.
I wrote a seperate little app...
|
by: hisham123 |
last post by:
I had windows xp 2002 service pack 2. i install vb6.0, crystal report 8.0, if i tried to access vb porjects references showing error accessing system registry could anybody give solution for this
with regards
hisham
| |
by: kingkongpennock |
last post by:
Hi there,
i have a frustrating problem on my hands. at first i had nero 8 ultra, but realized i did not need it any more. so i did the usual thing and tried to uninstall it. all was going well untill a message popped up saying "error accessing ole registry." since im not too bright with my computer, i thought nothing of it. i continued with the uninstallment, and it finished, keying me to restart my computer to finish uninstalling nero...
|
by: rajubaba9 |
last post by:
error '8002801c'
Error accessing the OLE registry.
/iisHelp/common/500-100.asp, line 17
|
by: David Schrader |
last post by:
Hello all,
Let me start by saying that I'm not certain whether this belongs
here, in this notes group, or another more developmentally
oriented one. I'll try starting here then go elsewhere if you
decide otherwise. (Already forwarded here, sort-of, from:
microsoft.public.windowsnt.registry.)
I'm writing a Visual Basic program which stores and retrieves
data in the registry - no big thing, I've got all that code written
|
by: ranesmitas |
last post by:
Hi,
In visual Basic when I add reference it shows following error
Error Accessing the System Registry
Please tell me solution.
|
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: 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: 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: 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...
| |