What to do with "Undefined function 'Dir$' in expression"

D

doyle60

"I have installed Windows Access 2007 on my new laptop [with Windows
7]. When I try to open any database that has a PhotoPath for images, I
get the following message "Undefined function 'Dir$' in expression"
and that's as far as I get. Previously, I was able to get to the
database and change the PhotoPath, but I can't do that now. I can open
the Table view but not the Form view. I can't open the Query view
either. I assume the PhotoPath needs to change, but I don't know what
the new code should be, and how to do it."

I am posting the above for a friend who used to have Windows XP. I
taught this friend how to build a database for photographs. The
photos are not embedded but are drawn up with an event on an image
control.

Can anyone help here?

Thanks,

Matt
 
S

Stuart McCall

"I have installed Windows Access 2007 on my new laptop [with Windows
7]. When I try to open any database that has a PhotoPath for images, I
get the following message "Undefined function 'Dir$' in expression"
and that's as far as I get. Previously, I was able to get to the
database and change the PhotoPath, but I can't do that now. I can open
the Table view but not the Form view. I can't open the Query view
either. I assume the PhotoPath needs to change, but I don't know what
the new code should be, and how to do it."

I am posting the above for a friend who used to have Windows XP. I
taught this friend how to build a database for photographs. The
photos are not embedded but are drawn up with an event on an image
control.

Can anyone help here?

Thanks,

Matt

When VBA gives you an error message like:

Undefined function '<built-in function>' in expression

What its really telling you (usually) is that the project won't compile
because you have a missing reference to something. Check Tools | References
for anything marked 'MISSING'. Then either uncheck the item if you know you
don't need it, or re-establish the reference if you do.
 
D

doyle60

Thanks. My friend says this did not work.

He writes:

Thanks for the advice. However, I can't find anything listed as
"missing"
when I go to Tools References. I can't open the Form View or the
Queries
View to change anything. I can open the Tables View.

In Windows Vista, the PhotoPath began with "C:\Users\..." and I think
in
Windows 7 it should begin "C:\Libraries\..." but I'm not sure, and I
have no
way of changing the PhotoPath because I can't get to the design view
of
Queries.

What do you suggest I do now?
________

Matt
 
D

doyle60

I'm surprised this topic isn't getting much attention here. I suppose
doing images in Access is not a popular thing. Would someone mind
trying it out who has the same working environment as my friend? I
have image databases at work and they work just great in Access 97 and
in environments before Vista and Windows 7. In fact, this week, I
just built a new one. In my friend's database, like mine, the photos
are called up with code that runs when switching to a new record. The
code is a path to the photograph.

If someone could try it out and see the issue and solve it, it would
be a great help. Thanks,

Matt
 
R

Rick Brandt

I'm surprised this topic isn't getting much attention here. I suppose
doing images in Access is not a popular thing. Would someone mind
trying it out who has the same working environment as my friend? I
have image databases at work and they work just great in Access 97 and
in environments before Vista and Windows 7. In fact, this week, I
just built a new one. In my friend's database, like mine, the photos
are called up with code that runs when switching to a new record. The
code is a path to the photograph.

If someone could try it out and see the issue and solve it, it would
be a great help. Thanks,

Matt

If the same things work on your machine and not his then his installation is
messed up. You say he also cannot get into the design view of anything but
tables? That also sounds like he has a much bigger problem than the Dir()
function not working.

If it was simply a matter of the path being different that would not produce
the error you are describing.
 
D

doyle60

But I have a different Access (Access 97) and am working on something
other than Windows 7 and Vista. I taught him how to do this 8 years
ago. He has upgraded while I remain where I am. He also lives in
England and I can't see what is up, not that I would even know.

The error messages do sound as if there is an other problems than
photographs. Good point. But it seems at one point everything was
working but the photos. I tried to get more from him.

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top