PC Review


Reply
Thread Tools Rate Thread

Display error in distribution file but not development file?!?!?

 
 
Chris O''Neill
Guest
Posts: n/a
 
      24th Aug 2008
I'm having a weird problem I'm hoping someone can explain...

In my development MDB file, I have a text box on a form that has this in the
ControlSource field:

="Persons Related To: "+Trim$([txtFirstName])+" "+Trim$([txtLastName])

When I run the application in my development MDB file, it displays properly:

"Persons Related To: Chris O'Neill"

However, when I compile the MDB into an MDE file and distribute it to the
users, I get the dreaded "#Name?" error. I know that I can probably (?) fix
this using the Nz() function, but I'm curious why it would work on my
computer and not on someone else's???

Thanks, in advance, for any advice and assistance provided.

Regards, Chris

 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      24th Aug 2008
Most common reason would be a problem with the References collection.

Unfortunately, since MDEs don't contain actual VBA code, it's a bit of a
pain to track them down and correct with MDEs.

I talk a bit about it in
http://www.accessmvp.com/djsteele/Ac...nceErrors.html as well as in
my December, 2003 "Access Answers" column in Pinnacle Publication's "Smart
Access". You can download the column (and sample database) for free at
http://www.accessmvp.com/djsteele/SmartAccess.html

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Chris O''Neill" <(E-Mail Removed)> wrote in message
news4C4861B-FB6F-472A-A26F-(E-Mail Removed)...
> I'm having a weird problem I'm hoping someone can explain...
>
> In my development MDB file, I have a text box on a form that has this in
> the
> ControlSource field:
>
> ="Persons Related To: "+Trim$([txtFirstName])+" "+Trim$([txtLastName])
>
> When I run the application in my development MDB file, it displays
> properly:
>
> "Persons Related To: Chris O'Neill"
>
> However, when I compile the MDB into an MDE file and distribute it to the
> users, I get the dreaded "#Name?" error. I know that I can probably (?)
> fix
> this using the Nz() function, but I'm curious why it would work on my
> computer and not on someone else's???
>
> Thanks, in advance, for any advice and assistance provided.
>
> Regards, Chris
>



 
Reply With Quote
 
DawnTreader
Guest
Posts: n/a
 
      24th Aug 2008
On Aug 24, 8:38*am, "Douglas J. Steele"
<NOSPAM_djsteele@NOSPAM_canada.com> wrote:
> Most common reason would be a problem with the References collection.
>
> Unfortunately, since MDEs don't contain actual VBA code, it's a bit of a
> pain to track them down and correct with MDEs.
>
> I talk a bit about it inhttp://www.accessmvp.com/djsteele/AccessReferenceErrors.htmlas well as in
> my December, 2003 "Access Answers" column in Pinnacle Publication's "Smart
> Access". You can download the column (and sample database) for free athttp://www.accessmvp.com/djsteele/SmartAccess.html
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no private e-mails, please)
>
> "Chris O''Neill" <ChrisONe...@discussions.microsoft.com> wrote in message
>
> news4C4861B-FB6F-472A-A26F-(E-Mail Removed)...
>
>
>
> > I'm having a weird problem I'm hoping someone can explain...

>
> > In my development MDB file, I have a text box on a form that has this in
> > the
> > ControlSource field:

>
> > * *="Persons Related To: *"+Trim$([txtFirstName])+" "+Trim$([txtLastName])

>
> > When I run the application in my development MDB file, it displays
> > properly:

>
> > * "Persons Related To: *Chris O'Neill"

>
> > However, when I compile the MDB into an MDE file and distribute it to the
> > users, I get the dreaded "#Name?" error. *I know that I can probably (?)
> > fix
> > this using the Nz() function, but I'm curious why it would work on my
> > computer and not on someone else's???

>
> > Thanks, in advance, for any advice and assistance provided.

>
> > Regards, *Chris- Hide quoted text -

>
> - Show quoted text -


Ah, although I am no expert, and I have never tried the "txtField1 +
txtField2" method of putting things together, but shouldn't you be
using ="Persons Related To: " & Trim$([txtFirstName]) & " " & Trim$
([txtLastName]) ?

I have never had a problem when doing things that way.
 
Reply With Quote
 
DawnTreader
Guest
Posts: n/a
 
      24th Aug 2008
On Aug 24, 8:32*am, Chris O''Neill
<ChrisONe...@discussions.microsoft.com> wrote:
> I'm having a weird problem I'm hoping someone can explain...
>
> In my development MDB file, I have a text box on a form that has this in the
> ControlSource field:
>
> * * ="Persons Related To: *"+Trim$([txtFirstName])+" "+Trim$([txtLastName])
>
> When I run the application in my development MDB file, it displays properly:
>
> * *"Persons Related To: *Chris O'Neill"
>
> However, when I compile the MDB into an MDE file and distribute it to the
> users, I get the dreaded "#Name?" error. *I know that I can probably (?) fix
> this using the Nz() function, but I'm curious why it would work on my
> computer and not on someone else's???
>
> Thanks, in advance, for any advice and assistance provided.
>
> Regards, *Chris


Ah, although I am no expert, and I have never tried the "txtField1 +
txtField2" method of putting things together, but shouldn't you be
using ="Persons Related To: " & Trim$([txtFirstName]) & " " & Trim$
([txtLastName]) ?
 
Reply With Quote
 
Chris O''Neill
Guest
Posts: n/a
 
      24th Aug 2008
"Douglas J. Steele" wrote:

> Most common reason would be a problem with the References collection.


Well DRAT!!!

> Unfortunately, since MDEs don't contain actual VBA code, it's a bit of a
> pain to track them down and correct with MDEs.


DRAT!!! DRAT!!! DRAT!!! (

> I talk a bit about it in
> http://www.accessmvp.com/djsteele/Ac...nceErrors.html as well as in
> my December, 2003 "Access Answers" column in Pinnacle Publication's "Smart
> Access". You can download the column (and sample database) for free at
> http://www.accessmvp.com/djsteele/SmartAccess.html


(SIGH!) Thanks for that info, Doug. I did take a look at both articles.
Just FYI, the machine that's having the problem is running the same version
of Access (2002/XP) as the development machine. The development machine is
on Vista and theh problem machine is on XP. Btw, I'm not using any esoteric
libraries (just the ones that come "default" with Access XP plus DAO 3.6).

I tried taking out the Trim$ function but, alas, that didn't work. I
manaully added the reference to DAO 3.6 was added to the problem machine.
Neither fixed the problem. Since I'm dealing with an MDE file, using the
reference-fixer utilities mentioned in your article won't work, right?

Any other thoughts or suggestions?

Thanks for your help, even though you've wrecked my day!

Regards, Chris

 
Reply With Quote
 
Chris O''Neill
Guest
Posts: n/a
 
      24th Aug 2008
"DawnTreader" wrote:

> Ah, although I am no expert, and I have never tried the "txtField1 +
> txtField2" method of putting things together, but shouldn't you be
> using ="Persons Related To: " & Trim$([txtFirstName]) & " " & Trim$
> ([txtLastName]) ?


Well I'll be danged! I didn't notice that I used the arithmatic "+" instead
of the concantation "&" to put that together! I always use "&" so I'm not
sure where my mind was when I used the plus sign.

I'll give that a try and see if it fixes it. Thanks!

Regards, Chris

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      24th Aug 2008
While it is preferable to use & for concatenation, + is also permissible.
There is a subtle difference between the two: + propagates Nulls, while &
doesn't. In other words, "something" + Null results in Null, while
"something" & Null results in "something". However, I doubt very much that
that's relevant for this problem.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"DawnTreader" <(E-Mail Removed)> wrote in message
news:5ebf001e-e582-442e-886c-(E-Mail Removed)...
> - Show quoted text -


Ah, although I am no expert, and I have never tried the "txtField1 +
txtField2" method of putting things together, but shouldn't you be
using ="Persons Related To: " & Trim$([txtFirstName]) & " " & Trim$
([txtLastName]) ?

I have never had a problem when doing things that way.

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      24th Aug 2008
"Chris O''Neill" <(E-Mail Removed)> wrote in message
news:ECE72858-088E-49D2-82EC-(E-Mail Removed)...
> (SIGH!) Thanks for that info, Doug. I did take a look at both articles.
> Just FYI, the machine that's having the problem is running the same
> version
> of Access (2002/XP) as the development machine. The development machine
> is
> on Vista and theh problem machine is on XP. Btw, I'm not using any
> esoteric
> libraries (just the ones that come "default" with Access XP plus DAO 3.6).


Which libraries you are (or aren't) using isn't really relevant. It's quite
conceivable that, since you're talking about two different operating
systems, you've got different versions of files at play.

> I tried taking out the Trim$ function but, alas, that didn't work. I
> manaully added the reference to DAO 3.6 was added to the problem machine.
> Neither fixed the problem. Since I'm dealing with an MDE file, using the
> reference-fixer utilities mentioned in your article won't work, right?


Correct. None of the utilities mentioned will work. However, read the
section on that page after where I list the various utilities. I
specifically describe a technique that should work on MDEs.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


 
Reply With Quote
 
David W. Fenton
Guest
Posts: n/a
 
      24th Aug 2008
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in
news:#(E-Mail Removed):

> While it is preferable to use & for concatenation, + is also
> permissible. There is a subtle difference between the two: +
> propagates Nulls, while & doesn't. In other words, "something" +
> Null results in Null, while "something" & Null results in
> "something".


I don't consider that a subtle difference at all! It's a *crucial*
difference, and one that is incredibly useful, say for instance:

Mid(("12" + LastName) & (", " + FirstName), 3)

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
 
Reply With Quote
 
Chris O''Neill
Guest
Posts: n/a
 
      25th Aug 2008
"Douglas J. Steele" wrote:

> While it is preferable to use & for concatenation, + is also permissible.
> There is a subtle difference between the two: + propagates Nulls, while &
> doesn't. In other words, "something" + Null results in Null, while
> "something" & Null results in "something". However, I doubt very much that
> that's relevant for this problem.


Actually, it did make a difference. I'm not sure why it worked on the
development machine but not another machine, but when I changed "+" to "&"
everything worked fine on the other machine. Go figure!

Anyway, like I said, I never use "+" for non-arithmatic stuff, so my mind
must've been on another planet when I did it in this case. A global search
of the entire application didn't find any other instances of "+" instead of
"&".

My punishment, for such a dumb error, is to program everything in Cobol for
the next week! (Oh, no!!!)

Thanks, Dawn (and everyone!), for the help!

Regards, Chris

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
coping file from a remote file share - FILE IS NO LONG THERE bogus error message Heith Windows Vista Networking 0 18th Oct 2007 09:58 PM
Is unlimited file distribution of very large file possible? Yes lol sandosan Windows XP MovieMaker 0 2nd Feb 2007 10:22 AM
Is unlimited file distribution of very large file possible? Yes !!! lol sandosan Windows XP MovieMaker 0 2nd Feb 2007 10:22 AM
Is unlimited file distribution of very large file possible? Yes lol sandosan Windows XP Help 0 2nd Feb 2007 10:08 AM
Display error message when openning excel file Huayang Microsoft Excel Discussion 1 15th Jan 2004 11:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:30 PM.