Problem with the Replace Function in Northwind Database Template

Viewed 34

Good day everyone, I have ms access 2007-2016 file format, I have recently downloaded the Northwind Database Template, I tried to run a query on some table, let's take table "Products" as example, it has a field named "Product Name" of type short text, if I try to run the following query SELECT Products.[Product Name], Replace([Product Name],"Northwind Traders ","") AS Product FROM Products; The results of the second column will turn out all to be "#Error", it seems that it's the problem with this particular file, since I don't have problems with other files, but I don't know what's wrong with this Northwind Database.

1 Answers

that query should work.

You could do a ctrl-g (jump to immediate window). And from the menu go tools->References.

You should say see this:

enter image description here

there should not be any "missing" references.

Close the above reference window, and then try this option:

Open up the vb module called Utilites, and "dirty" the module. (just hit enter key in a blank line - add a new blank line).

Say hit enter key here:

enter image description here

Now, from menu do this: debug->compile

enter image description here

Does the database compile?

This sounds like a broken reference. But that should not occur from a fresh blank new template as you have.

Your query as posted works fine for me.

enter image description here

Related