O'Reilly logo

Microsoft® Access Projects with Microsoft SQL Server™ by Natascha Nicol, Ralf Albrecht

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

User-Defined Functions

When Access programmers are asked what they miss most when programming Access projects with SQL Server/MSDE, the answer is usually the fact that there is no way for them to use their own Microsoft Visual Basic for Applications (VBA) functions in SQL queries, such as this:

SELECT FilmNr, FilmInfo(Filmtitle, MPAANr, Length) FROM tblFilms

The function FilmInfo in this example is a VBA function that assembles a formatted character string from the parameters passed.

There’s good news and there’s bad news: The good news is that SQL Server 2000/MSDE 2000 supports user-defined functions (UDFs). The bad news (from the point of view of most Access programmers) is that VBA functions are not supported. Instead, the UDFs have to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required