Public function not recognised in 2003

Sprocket

Registered User.
Local time
Today, 22:58
Joined
Mar 15, 2002
Messages
70
Hi,

I have a report works fine in Access 2000 - Does't work so well in 2003

The problem is I have a six line address made up from six seperate fields,

ADD1, ADD2 etc. If I just place the fields in line under one another any blank field produces a blank line - not so good when there is the Post Code hangin a couple of lines down.

In Access 2000 I got round this by hiding the address fields with properties, visible = no and then creating a public function called FullAddress that tested to see which fields had a value and concatenated them with a CHR(10)&CHR(13) code between each line.

I then put a text box in the report header and in the text box I entered:
=[FullAddress]

This works fine in 2000 but is not recognised in 2003.

I've tried the decompile option and then recompile but this does not work.
I've tried placing the public function both on the report (where it works in 2000) and in a seperate utility module but nothing seems to work in 2003.

Any ieads would be appreciated.

Regards... Sprocket
 
Sorry to not answer your main question, but just for your information, if you set the "Can Shrink" property to a text box and the details section, you will not experience the "extra lines" hanging around problem, IF you don't have any other controls on either side of the text boxes that display the address fields. The blank space will be removed automatically.
 
Hi Boblarson.
Thanks for your reply - But maybe I didn't express myself clearly enough.

Originaly I had field controls on the report, which are in effect text boxes, and I did try setting the "Can Shrink" property to yes but this doesn't seem to work. I have tried setting the "Can Shrink" property for the report group header to YES also but this still doesn't work - empty lines are left hanging.

I have tried this in various OS/application configurations eg,

Windows 2000 + Access 2000
Windows 2000 + Access 2003
XP + Access 2000
XP + Access 2003

and all of these leave empty lines hanging.

Could this have anything to do with what constitutes empty. Is a null value equal to empty in this context or not?
 
Null is empty.
If the fields overlap they wont shrink and if they have any other fields/lables on the same row of the report they wont shrink.

When you say your code is not recognised do you mean it errors or just does nothing?
Do you have other custom functions that work OK?

Peter
 
Hi = yes I have many other custom functions that work OK. I did have a problem with several when my machine was upgraded to Access 2003 sitting on a Windows 2000 platform but using decompile, clearing some references and then picking them up again solved that problem. However, my PC has now been upgraded to XP professional and whoops this custom function is not recognised. On the report it comes up with #Name? instead of the address block.
 
I think
=[FullAddress]
should be
=FullAddress()

You may need to pass it something in the brackets though.
try using the builder to insert your function.

Peter
 
Brilliant Bat17 that has sorted it.

I wonder why it works as =[fulladdress] in Access 2000.
 

Users who are viewing this thread

Back
Top Bottom