learn bout functions?

hunterfan48

Registered User.
Local time
Today, 01:29
Joined
Aug 17, 2008
Messages
436
I see so many functions to be put into queries and simply I don't know what they mean. Is there a site that would put it in dumb-dumb language for me to understand what each one does and how that is relevant to my card inventory, transactions, etc.???

I've looked up some sites but not seein anything to helpful yet...

thanks in advance
 
what sort of things do you mean? Its very hard to provide a full listing. Just thnik about it in general terms

a function is normally a small routine that processes something or other, and possibly returns an answer. If access doesnt have inbuilt functions to do what you want, you can write your own. a sub is merely a function that doesnt return a value.

Take an access date - this actually consists of both a date and a time (the time is often ignored, so you only bother with the date bit) A date is actually stored in access as a real number, not as a string, representing the number of days since a start date (that happens to be 30/11/1899)

so you have functions to

a) extract the day, month, year as a value
b) extract the day, month as text, either in full or abbreviated
c) evaluate the week number in which the date falls
d) add/take away another date/time amount ot produce a new date
e) format the date into a particular format you require
f) construct a date value from any valid text string
g) construct a date value from a given day, month and year number

and so on.

You just tend to get used to functions you use and need. There is often something avaialble, and access help may assist you to locate it.

but even if there isnt a date function to do exactly what you want with a date, you can write one - which is how and why people come up with various datepickers to open a calendar, let you navigate to a date, and pick it. This function is not inbuilt, but is useful, and once prepared is portable and resusable in your apps.
==============

MS often release new functions though - probably as a result of developers asking for them.

eg - in A97 and now, there is an instr function - search for a substring within a string. Now what you often need to do is find the last occurrence of something

say you have a full filepath

d:\mainfolder\subfolder\groupfolder\myfilename

you want to split this into the
path - d:\mainfolder\subfolder\groupfolder
file - myfilename

using instr, you have to repeatedly search for the \ character until you find the last one

in later versions access included another function instrrev which search backwards. But anybody who needed that functionaslity had probably already written code to do it - and may not even have been aware it now existed.

============
so to go back to your original question

dont think in terms of what functions there might be. just assume there is a function for anything you need to do. And if there isnt, you can write one, anyway. So if you can do this in a way that makes it portable, then you can build up a library of commonly used functions.
 
just seen I never got back to you but thanks...this helps
 
The actual code listing of some of the newer functions can be seen in support pages for older versions of Access. They were provided for users to add as required but were later added into the inbuilt functions of Access.
 

Users who are viewing this thread

Back
Top Bottom