473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Adding a function/module to Access 2000

Hi all,

I've found a module that I think will help me combine fields properly, but I'm unsure how to add or use it with Access
2000. Below is the module I'd like to add:

http://www.mvps.org/access/modules/mdl0008.htm

In Access, I goto Modules and create new. Leaving 'Option Compare Database' on top I paste the module code in and save
- naming it fConcatFld. It saves fine, but when I use fConcatFld in my query, like below:

SELECT PtName, fConcatFld("PtNotes") as Combined
FROM TESTCMSSPatientNotesQ001
Group by PtName

It errors out saying fConcatFld is an invalid function. I might have this entire process wrong... so how do I add this
function to Access so I can use it?

Thanks,

Alex.
Nov 12 '05 #1
7 3979
CDB
Alex, have you checked that the module compiles? In the VB editor, call
Debug/Compile menu.

You may have troubled with these lines:
Dim lodb As Database, lors As Recordset
Dim lovConcat As Variant, loCriteria As String
Dim loSQL As String
Const cQ = """"

1. You need to ensure that Tools/References includes Microsoft DAO 3.6
Library, and it is selected.

2. Change two of the above to
Dim lodb As DAO.Database
Dim lors As DAO.Recordset

Clive

"Alex" <al**@totallynerd.com> wrote in message
news:dv********************@sysmatrix.net...
Hi all,

I've found a module that I think will help me combine fields properly, but I'm unsure how to add or use it with Access 2000. Below is the module I'd like to add:

http://www.mvps.org/access/modules/mdl0008.htm

In Access, I goto Modules and create new. Leaving 'Option Compare Database' on top I paste the module code in and save - naming it fConcatFld. It saves fine, but when I use fConcatFld in my query, like below:
SELECT PtName, fConcatFld("PtNotes") as Combined
FROM TESTCMSSPatientNotesQ001
Group by PtName

It errors out saying fConcatFld is an invalid function. I might have this entire process wrong... so how do I add this function to Access so I can use it?

Thanks,

Alex.

Nov 12 '05 #2
Alex wrote:
Hi all,

I've found a module that I think will help me combine fields
properly, but I'm unsure how to add or use it with Access 2000.
Below is the module I'd like to add:

http://www.mvps.org/access/modules/mdl0008.htm

In Access, I goto Modules and create new. Leaving 'Option Compare
Database' on top I paste the module code in and save - naming it
fConcatFld. It saves fine, but when I use fConcatFld in my query,
like below:

SELECT PtName, fConcatFld("PtNotes") as Combined
FROM TESTCMSSPatientNotesQ001
Group by PtName

It errors out saying fConcatFld is an invalid function. I might have
this entire process wrong... so how do I add this function to Access
so I can use it?

Thanks,

Alex.


Read the page you got the code from...

You need the function from the NorthWind database that comes as a sample
with Access.

"Using the fConcatFld function, in the Northwind database..."

^^^^^^^^^^^^^^^^^^^^^^^

:P
--
regards,

Bradley
Nov 12 '05 #3
"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message news:<40********@nexus.comcen.com.au>...
Alex wrote:
Hi all,

I've found a module that I think will help me combine fields
properly, but I'm unsure how to add or use it with Access 2000.
Below is the module I'd like to add:

http://www.mvps.org/access/modules/mdl0008.htm

In Access, I goto Modules and create new. Leaving 'Option Compare
Database' on top I paste the module code in and save - naming it
fConcatFld. It saves fine, but when I use fConcatFld in my query,
like below:

SELECT PtName, fConcatFld("PtNotes") as Combined
FROM TESTCMSSPatientNotesQ001
Group by PtName

It errors out saying fConcatFld is an invalid function. I might have
this entire process wrong... so how do I add this function to Access
so I can use it?

Thanks,

Alex.


Read the page you got the code from...

You need the function from the NorthWind database that comes as a sample
with Access.

"Using the fConcatFld function, in the Northwind database..."

^^^^^^^^^^^^^^^^^^^^^^^

:P


Hi,

The give the code to add to *any* database, but use Northwind as an
example. From what I read the code isn't specific to Northwind, else
what use would giving an example code with such a disclaimer in the
comments be used for?

Thanks for the comments...

Alex
Nov 12 '05 #4
Alex wrote:
"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message
news:<40********@nexus.comcen.com.au>...
Alex wrote:
Hi all,

I've found a module that I think will help me combine fields
properly, but I'm unsure how to add or use it with Access 2000.
Below is the module I'd like to add:

http://www.mvps.org/access/modules/mdl0008.htm

In Access, I goto Modules and create new. Leaving 'Option Compare
Database' on top I paste the module code in and save - naming it
fConcatFld. It saves fine, but when I use fConcatFld in my query,
like below:

SELECT PtName, fConcatFld("PtNotes") as Combined
FROM TESTCMSSPatientNotesQ001
Group by PtName

It errors out saying fConcatFld is an invalid function. I might
have this entire process wrong... so how do I add this function to
Access so I can use it?

Thanks,

Alex.


Read the page you got the code from...

You need the function from the NorthWind database that comes as a
sample with Access.

"Using the fConcatFld function, in the Northwind database..."

^^^^^^^^^^^^^^^^^^^^^^^
P


Hi,

The give the code to add to *any* database, but use Northwind as an
example. From what I read the code isn't specific to Northwind, else
what use would giving an example code with such a disclaimer in the
comments be used for?

Thanks for the comments...

Alex


You need to cut and paste into your database the function fConcatFld()
function found in the modules in the Northwind database.

The page says it depends on a function that is in the Northwind
database... so you need a copy of that as well. Read the web page
carefully.
--
regards,

Bradley
Nov 12 '05 #5
"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message news:<40********@nexus.comcen.com.au>...
Alex wrote:
"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message
news:<40********@nexus.comcen.com.au>...
Alex wrote:
Hi all,

I've found a module that I think will help me combine fields
properly, but I'm unsure how to add or use it with Access 2000.
Below is the module I'd like to add:

http://www.mvps.org/access/modules/mdl0008.htm

In Access, I goto Modules and create new. Leaving 'Option Compare
Database' on top I paste the module code in and save - naming it
fConcatFld. It saves fine, but when I use fConcatFld in my query,
like below:

SELECT PtName, fConcatFld("PtNotes") as Combined
FROM TESTCMSSPatientNotesQ001
Group by PtName

It errors out saying fConcatFld is an invalid function. I might
have this entire process wrong... so how do I add this function to
Access so I can use it?

Thanks,

Alex.

Read the page you got the code from...

You need the function from the NorthWind database that comes as a
sample with Access.

"Using the fConcatFld function, in the Northwind database..."

^^^^^^^^^^^^^^^^^^^^^^^

P


Hi,

The give the code to add to *any* database, but use Northwind as an
example. From what I read the code isn't specific to Northwind, else
what use would giving an example code with such a disclaimer in the
comments be used for?

Thanks for the comments...

Alex


You need to cut and paste into your database the function fConcatFld()
function found in the modules in the Northwind database.

The page says it depends on a function that is in the Northwind
database... so you need a copy of that as well. Read the web page
carefully.

Hi.

I guess that's the problem... where to I paste the function into
Access? There's no obvious place called 'Functions' where you put
stuff like this. I tried adding it as a Module, but didn't work...
says Unknown Function.

So back to my root question... where the heck do I put the Function
code in Access so queries will see the custom function?

Thanks,

Alex.
Nov 12 '05 #6
This is all I can see of this thread, so I don't know whether it's been
covered elsewhere, but you're using fConcatFld("PtNotes") in your query, and
the code in the URL you mention requires 5 arguments.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"Alex" <al**@totallynerd.com> wrote in message
news:2b**************************@posting.google.c om...
"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message

news:<40********@nexus.comcen.com.au>...
Alex wrote:
"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message
news:<40********@nexus.comcen.com.au>...
> Alex wrote:
>> Hi all,
>>
>> I've found a module that I think will help me combine fields
>> properly, but I'm unsure how to add or use it with Access 2000.
>> Below is the module I'd like to add:
>>
>> http://www.mvps.org/access/modules/mdl0008.htm
>>
>> In Access, I goto Modules and create new. Leaving 'Option Compare
>> Database' on top I paste the module code in and save - naming it
>> fConcatFld. It saves fine, but when I use fConcatFld in my query,
>> like below:
>>
>> SELECT PtName, fConcatFld("PtNotes") as Combined
>> FROM TESTCMSSPatientNotesQ001
>> Group by PtName
>>
>> It errors out saying fConcatFld is an invalid function. I might
>> have this entire process wrong... so how do I add this function to
>> Access so I can use it?
>>

Nov 12 '05 #7
Alex wrote:
"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message
news:<40********@nexus.comcen.com.au>...
Alex wrote:
"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message
news:<40********@nexus.comcen.com.au>...
Alex wrote:
> Hi all,
>
> I've found a module that I think will help me combine fields
> properly, but I'm unsure how to add or use it with Access 2000.
> Below is the module I'd like to add:
>
> http://www.mvps.org/access/modules/mdl0008.htm
>
> In Access, I goto Modules and create new. Leaving 'Option Compare
> Database' on top I paste the module code in and save - naming it
> fConcatFld. It saves fine, but when I use fConcatFld in my query,
> like below:
>
> SELECT PtName, fConcatFld("PtNotes") as Combined
> FROM TESTCMSSPatientNotesQ001
> Group by PtName
>
> It errors out saying fConcatFld is an invalid function. I might
> have this entire process wrong... so how do I add this function to
> Access so I can use it?
>
> Thanks,
>
> Alex.

Read the page you got the code from...

You need the function from the NorthWind database that comes as a
sample with Access.

"Using the fConcatFld function, in the Northwind database..."

^^^^^^^^^^^^^^^^^^^^^^^

> P

Hi,

The give the code to add to *any* database, but use Northwind as an
example. From what I read the code isn't specific to Northwind, else
what use would giving an example code with such a disclaimer in the
comments be used for?

Thanks for the comments...

Alex


You need to cut and paste into your database the function
fConcatFld() function found in the modules in the Northwind database.

The page says it depends on a function that is in the Northwind
database... so you need a copy of that as well. Read the web page
carefully.

Hi.

I guess that's the problem... where to I paste the function into
Access? There's no obvious place called 'Functions' where you put
stuff like this. I tried adding it as a Module, but didn't work...
says Unknown Function.

So back to my root question... where the heck do I put the Function
code in Access so queries will see the custom function?

Thanks,

Alex.


You've added the function from the web site right? Ok.

Now, you need to ALSO add the function from the Northwind database that
is referred to in the previous function (as noted on the web site).

So...

Create a new module...
Cut and paste the initial function from the web site...
Go to Northwind.mdb and cut and paste the fConcatFld() function into
your new module

--
regards,

Bradley
Nov 12 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Geoff Biggs | last post by:
Evening all, I'm trying to add a new built-in number data type to Python with its own syntax, so I'm working directly with the interpreter rather than creating my own extension module (side...
5
by: Dave Bovey | last post by:
I created a church database in Access 97 that contain the typical Name, Address, and Phone Number information fields. I had a number of different reports to print query data in different formats. ...
2
by: Brad Hood | last post by:
Hi, In our company we use Access 2000 as a "thin client" getting all of our information from a SQL Server database. We use a custom function to populate list and combo boxes which, for some...
7
by: Alex | last post by:
Hi all, I've found a module that I think will help me combine fields properly, but I'm unsure how to add or use it with Access 2000. Below is the module I'd like to add: ...
3
by: Dave | last post by:
I have an Access 2K application that is distributed to about a dozen users (all with identical NT environments and identical Access versions, object libraries and service packs). I am using the VBA...
4
by: Paul T. RONG | last post by:
Dear All, I add two new tables to the database and then the disable shift key codes don't work. These two new tables are actually created by two queries, and only these two are in the front end,...
14
by: Lauren Wilson | last post by:
Well, it has finally happened. We have a five year old app that is widely distributed. I cannot get an update done because none of the code modules will open. Access complains that the module...
11
by: Yelena Varshal via AccessMonster.com | last post by:
Hello, I have a problem with one of msaccess.exe API calls that work on my desctop but does not work on the laptop from within MS ACCESS. There is a lot of differences between 2 computers...
2
by: Serious_Practitioner | last post by:
Good day, and thank you in advance for any assistance. I'm having trouble with something that I'm trying for the first time. Using Access 2000 - I want to run a function either on the click of a...
4
by: alanmcarter | last post by:
we have 2 Access Applications. One is in Access 97, the other in 2000. With Access 97 I was able to replace a module that contains an old web address using docmd.TransferDatabase. When I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.