Error out of nowhere (1 Viewer)

polina

Registered User.
Local time
Today, 18:26
Joined
Aug 21, 2002
Messages
100
I have this string assigned to the variable in the query:

strFullName = Trim$([BlackBerryRecord].[LastName]) & ", " & [BlackBerryRecord].[FirstName]

It worked find, but all of the sudden started given me the error FUNCTION ISN'T AVAILABLE IN EXPRESSIONS IN QUERY EXPRESSION ' Trim$([BlackBerryRecord].[LastName]) & ", " & [BlackBerryRecord].[FirstName].'

Why did it work before and does not work now? What could have gone wrong with query?

Please help

Thanks
 

DES

Technoweenie
Local time
Today, 13:26
Joined
Apr 17, 2001
Messages
245
Possible reference problem

Have you moved the database to another computer?
 

polina

Registered User.
Local time
Today, 18:26
Joined
Aug 21, 2002
Messages
100
No...but I've replaced the table that was used in the query with a table from another db....
 

DES

Technoweenie
Local time
Today, 13:26
Joined
Apr 17, 2001
Messages
245
Structure changed?

Has the structure of the tables changed between the two tables?
 

DES

Technoweenie
Local time
Today, 13:26
Joined
Apr 17, 2001
Messages
245
Confidential

If it is not confidential information you could send me the database and I will have a look at it for you.
 

polina

Registered User.
Local time
Today, 18:26
Joined
Aug 21, 2002
Messages
100
ok,

table and a query is in db attached
 

Attachments

  • db1.zip
    69.6 KB · Views: 94

DES

Technoweenie
Local time
Today, 13:26
Joined
Apr 17, 2001
Messages
245
wrong table

does not include the Blackberry table so the query is no good
 

polina

Registered User.
Local time
Today, 18:26
Joined
Aug 21, 2002
Messages
100
Well, sorry....i just renamed BlackBerryRecord to Record........if you rename table back to BlackBerryRecord......then query will be good
 

DES

Technoweenie
Local time
Today, 13:26
Joined
Apr 17, 2001
Messages
245
Did you realize

That there was another table being looked for in this query. It is a table called Configuration. Once that table has been removed from the query and the $ taken out of the Trim equation you are fine.
 

polina

Registered User.
Local time
Today, 18:26
Joined
Aug 21, 2002
Messages
100
But i need to have Configuration table involved in this query.
And this query worked fine before.....what is wrong with TRIM$?
 

DES

Technoweenie
Local time
Today, 13:26
Joined
Apr 17, 2001
Messages
245
Not sure why

Trim$ returns a String while Trim return a Variant. That seems to be making a difference in your equation
 

polina

Registered User.
Local time
Today, 18:26
Joined
Aug 21, 2002
Messages
100
I have just tried TRIM......removed Configuraion table........it still gives the same error....
 

DES

Technoweenie
Local time
Today, 13:26
Joined
Apr 17, 2001
Messages
245
Hmmm

It is working here. Check to make sure you have all your references and nothing is missing there.
 

polina

Registered User.
Local time
Today, 18:26
Joined
Aug 21, 2002
Messages
100
You were right ...it was the references problem
I have installed SQL Server recently and after that TRIM$ function stopped working. So I had to refresh references used in my Access application. Now it works fine.

Thank you very much for your help. I appreciate it a lot.
 

Users who are viewing this thread

Top Bottom