ok so now when I try to compile I'm still getting the following message
"User-defined type not defined"
now in the help it says
"You can create your own data types in Visual Basic, but they must be defined first in a Type...End Type statement or in a properly registered object library or type library."
I thought the DAO library would solve the problem but it has not. So I'm wondering if this part of the code in the problem? Mind you I know nothing about VBA I have been getting help from these forums.
Function GetRate(lngProdID As Long, lngQty As Quantity) As Currency
Yes i believe so I got the DAO reference added. and I compared it to the list on the website you gave me and made sure that they were the same Here is what is checked
I attached a image of it in a word doc but I had to zip it to get the size right.
You've copied and pasted the code from somewhere and trying to amend it to your needs without understanding basic vba. You first of all need to understand the basics before trying to amend code.
The reason it went "ding" when you tried to compile again is because you didn't stop the code after it halted due to an error.
You can declare a variable as an Integer. If you knew what UDT's are then yes you can define a variable as a quantity but that doesn't apply in your case. Get the basics first.
yes this code is from earlier in the post page 1, I have been reading on the basics and I am trying to learn and the person who wrote this code posted an explination for the code so I kind of understand this specific code and like I said i'm trying to learn the basics
We can't provide you with basic vba via the forum because it would require self study. There are so many elements to understand. I can provide a link to a tutorial if you wish?
In the meantime, what is the current situation with the code?
that is what I have I was just wondering If it would be easier to learn in 2010 that seems to be the selling point in some of the things I read and heard.... either way I still have to learn LOL
VBA is pretty much the same across all versions. The main difference is for newer versions of Access some methods/functions/properties are deprecated and some new ones are added.
It would be much easier to learn how to use Access in 2010 but it wouldn't make a difference when it comes to vba.
Ok well i think I have a pretty good basic understanding of Access... and if it isn't gonna help in learning vba then i'll just upgrade at a later date