UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> User Defined Type Not Defined, Access 2013    
 
   
cwac60
post Dec 19 2017, 06:56 AM
Post#1



Posts: 820
Joined: 1-April 09
From: Queensland Australia


Dear Colleagues
I downloaded a Bookings.mdb from UA and upgraded it to MSA 2010 and renaming it to Calendar.accdb which works find.
I then copied relevant code dealing specifically with the year combo i.e.
Option Compare Database
Option Explicit
Dim objCurrentDate As New objDateInfo 'will hold current Year, Month & Date info
Dim intMonth As Integer
Dim intYear As Integer
Go to the top of the page
 
cwac60
post Dec 19 2017, 06:59 AM
Post#2



Posts: 820
Joined: 1-April 09
From: Queensland Australia


Continues
Here are the errors encountered. I did try various references but no luck.
Your help appreciated.
Regards cwac60
Attached File(s)
Attached File  Error_on_open.JPG ( 20.42K )Number of downloads: 11
Attached File  References.JPG ( 20.07K )Number of downloads: 0
 
Go to the top of the page
 
GroverParkGeorge
post Dec 19 2017, 07:24 AM
Post#3


UA Admin
Posts: 33,017
Joined: 20-June 02
From: Newcastle, WA


What is the reference behind objDateInfo ? Where does that come from? You copied "some" of the code, but I suspect this was not part of what you copied, so you need to go back to the source and figure out where it comes from.

--------------------
Go to the top of the page
 
BruceM
post Dec 19 2017, 07:27 AM
Post#4


UtterAccess VIP
Posts: 7,502
Joined: 24-May 10
From: Downeast Maine


It would have helped to see the database, or if you had provided a link to it.

Did you compile the code?

objDateInfo seems to be a user defined type. Does it appear anywhere else in the code?

Edit: George beat me to it, wondering about the same thing as I was.
Go to the top of the page
 
cwac60
post Dec 19 2017, 08:12 AM
Post#5



Posts: 820
Joined: 1-April 09
From: Queensland Australia


Hi George & Bruce
I apologize for not finding the web link for origin of this file. I usually do maintain history.
However I have attached the original Bookings.mdb file.
There is ample discussion about references to use especially DAO which I tried and managed to get a conflict but no results.
My aim is to adapt this calendar using a different table but first step was to isolate the Year part of the calendar to use in conjunction with the month which I have adapted as it has row source hardwired in combo. The year one operates on a subroutine to generate the years.

Regards
cwac60
Attached File(s)
Attached File  Bookings.zip ( 58.51K )Number of downloads: 18
 
Go to the top of the page
 
BruceM
post Dec 19 2017, 08:41 AM
Post#6


UtterAccess VIP
Posts: 7,502
Joined: 24-May 10
From: Downeast Maine


Does your version have the class module objDateInfo?
Go to the top of the page
 
zocker
post Dec 19 2017, 11:01 AM
Post#7


Utterly Eccentric and Moderator
Posts: 4,062
Joined: 4-March 00
From: Bristol / Ipswich / Spain


I posted a Bookings demo in the Code Archive HERE You might find it helpful for your purposes!

All the best

Zocker

--------------------
I would like to remind members and visitors that UtterAccess is a NON SMOKING website. In that respect, it is the worlds first Thank you for not smoking.
Go to the top of the page
 
cwac60
post Dec 21 2017, 07:28 PM
Post#8



Posts: 820
Joined: 1-April 09
From: Queensland Australia


Hi BruceM,
I am not familiar with Class modules. I assume they reside in an obscure MSA folder.
Given that the updated version works, it would be a better approach to successively delete VBA to isolate the problem; or else start from first principles.
Regards
cwac60
Go to the top of the page
 
missinglinq
post Dec 21 2017, 07:47 PM
Post#9



Posts: 4,510
Joined: 11-November 02



What exact action was tripping the error? I can't recreate your problem.

Linq ;0)>

--------------------
Hope this helps!

The problem with making anything foolproof...is that fools are so darn ingenious!

All posts/responses based on Access 2003/2007
Go to the top of the page
 
missinglinq
post Dec 22 2017, 07:26 AM
Post#10



Posts: 4,510
Joined: 11-November 02



Also, if you enter something like this

Dim Whatever As New objD

the dropdown box (is this also called Intellisense?) does offer

objDateInfo

as a valid object...at least in v2007.

Linq ;0)>


--------------------
Hope this helps!

The problem with making anything foolproof...is that fools are so darn ingenious!

All posts/responses based on Access 2003/2007
Go to the top of the page
 
BruceM
post Dec 27 2017, 07:28 AM
Post#11


UtterAccess VIP
Posts: 7,502
Joined: 24-May 10
From: Downeast Maine


QUOTE
I am not familiar with Class modules. I assume they reside in an obscure MSA folder.

In the Object Explorer (I think that is what it is called -- I refer to the listing of tables, queries, etc.) the class modules are in the Modules group.
Go to the top of the page
 
JonSmith
post Dec 27 2017, 07:59 AM
Post#12



Posts: 3,555
Joined: 19-October 10



The database you provided has a class module in it called objDateInfo which I assume you are missing.
I am not sure what an 'MSA' folder is but you need to learn how to use class modules.

That being said, the class module in this case only holds a month, day and year value and nothing else. As a result I think it being a class is a poor use of a class module, a custom type would be more appropriate I think.
Go to the top of the page
 
mike60smart
post Dec 27 2017, 09:59 AM
Post#13


UtterAccess VIP
Posts: 12,650
Joined: 6-June 05
From: Dunbar,Scotland


Hi cwac60

I downloaded the Db and do not appear to have any problems with the selection of a specific Month or Year??


--------------------
Hope this helps?

Mike

Get happiness out of your work or you may never know what happiness is.

Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    17th July 2018 - 02:19 PM