[AccessD] update qry to deconstructe place

DWUTKA at marlow.com DWUTKA at marlow.com
Tue Aug 17 14:59:25 CDT 2004


Name the module modSplitDeathPlace.  Having the module, and function, with
the same name, is what is kicking up that error. 

Also, I just ran the code against the copy I had...change the code to this:

Function SplitDeathPlace(strPlace As String, intPos As Long) As String
Dim strArray() As String
strArray = Split(strPlace, ",")
If intPos > UBound(strArray) Then
    SplitDeathPlace = ""
Else
    SplitDeathPlace = Trim(strArray(intPos))
End If
End Function

That should handle any issues that pop up.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of KathrynAtGwens
Sent: Tuesday, August 17, 2004 12:01 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] update qry to deconstructe place


I'm doing something wrong.
I clicked on Modules and then on New. I pasted in the Function code. Named
the module SplitDeathPlace. Compiled it. Saved it. First indication
something not right is that when I'm back at Modules, the SplitDeathPlace
doesn't show up. But when I click on new again, it is there. 
http://www.babcockancestry.com/storage/accessmodulesplitdeathplace.jpg

Thinking that there is a reason it's not showing, I go on to next step and
make an (update) query.
http://www.babcockancestry.com/storage/accessquerysplitdeathplace.jpg
When I try to run it, I get:
Undefined function 'SplitDeathPlace' in expression

Does not showing on the main screen right panel when clicking on modules on
main screen left panel have anything to do with this?

This is the first module I've made, so maybe how I did it was wrong?

--
Kathryn Bassett (at work address)
kathrynatgwens at socal.rr.com
kathryn at bassett.net (home) 

> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of
> DWUTKA at marlow.com
> Sent: Tuesday, August 17, 2004 8:04 AM
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] update qry to deconstructe place
> 
> 
> Then put this in a module:
> 
> Function SplitDeathPlace(strPlace As String, intPos As Long) AS String
> Dim strArray() As String
> strArray=Split(strPlace,", ")
> SplitDeathPlace=strArray(intPos)
> End Function
> 
> And in your query, put the following for DeathCity:
> 
> SplitDeathPlace([DeathPlace],0)
> 
> Replace the 0 with 1 for deathcounty, and 2 for deathstate
> 
> Drew
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Kathryn
> Bassett
> Sent: Monday, August 16, 2004 7:57 PM
> To: 'Access Developers discussion and problem solving'
> Subject: RE: [AccessD] update qry to deconstructe place
> 
> 
> Yes 
> 
> --
> Kathryn Rhinehart Bassett (Pasadena CA)
> "Genealogy is my bag" "GH is my soap"
> kathryn at bassett.net
> http://bassett.net   
> 
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com 
> > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of 
> > DWUTKA at marlow.com
> > Sent: 16 Aug 2004 1:32 pm
> > To: accessd at databaseadvisors.com
> > Subject: RE: [AccessD] update qry to deconstructe place
> > 
> > I forgot, are you using Access 2000?
> > 
> > Drew
> 
> -- 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> -- 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list