Replace

Gismo

Registered User.
Local time
Today, 09:03
Joined
Jun 12, 2017
Messages
1,298
Hi all,

Please could you advise in any annunciation in the below code

Replace could be the problem here

SB #: [SB/AD Master]![Aircraft Type] & "/" & [SB/AD Master]![MI Type] & "/" & Replace ( [SB/AD No] , '-' , '/' ) & "/R" & [Revision Status]

I am getting a visual basic module containing a syntax error, compile error
 
Why not take it small steps, one at a time?
You could Debug.Print that in the immediate window?

Perhaps it is your awful naming convention? Surround SB # with [ and ] ?
 
Yep, I'm with Gasman here - special characters in variable names are sure tripping points.

Syntactically, everything to the RIGHT of the colon looks compilable, but you might wish to check for any of those bracketed items being null.
 
Still getting the same error after breaking down the code
Replace seems to be giving a compile error

[SB #]: Replace([SB/AD Master],"-"," /")
 
Just where is this code?
It appears to be a query alias field from what you have written?

AFAIK, that does not generate compile errors?
 
Just where is this code?
It appears to be a query alias field from what you have written?

AFAIK, that does not generate compile errors?
Yes, this is a query

1687348362611.png
 
You don't have you own Replace function do you? :(
 
Works for me
1687349136103.png

so out of ideas, sorry.
 
Works for me
View attachment 108496
so out of ideas, sorry.
I had some issues yesterday where excel and word wont open
IT reinstalled my office suite, I believe from 32bit to 64bit
There after word and excel opened but non of the functions calculates
This code in Access word fine for the past 2 year and after the update i am getting quite a few issues
This is one of the issues I have after the update or reinstall rather
 
Confused- you also say


Which is it?

Check your references in vba, perhaps you are missing one or more
Excel and word was having issues not opening
after the reinstall, excel wont calculate a basic function

The query was for Access
 
Get your IT dept involved then.
 
So still no clearer - could be access vba, could be a query and now it is excel functions. So agree with gasman, talk to your IT dept
 

Users who are viewing this thread

Back
Top Bottom