The "LEFT" statement?

  • Thread starter Thread starter MJV
  • Start date Start date
M

MJV

Thanks for the info.
I thought that was it but still a no go! I have checked
version and also setup a fix.BAT file to transfer the
file to the location on the PC. I aslo checked references
and got them to match up. All are loaded. I looked at the
system files and all are loaded.

References VBA, Access, stdole, ADODB, PdfLib
Current user Admin
Jet version 4.0

Still errors on the LEFT statment in the code. Still lost
for ideas.
-----Original Message-----
this is usually a references problem.
On your good system open the code window (alt- F11),select
tools - references.
Select each in turn, not the path and filename, and the
order in which they appear in the list.
Go find each file in explorer, and note its version number.

Repeat the same exercise on the bad machine.
Check the order first, then make sure that none are
missing, finally repeat the version exercise.


.
..
 
My guess would be it is how VBA is interpreting
Left(AnyString, 2).

If it returns a 02, then it could be a number, especially
when you ADD (+) "000" as opposed to concatenating
(&) "000"

So, try changing it to:

MyStr = left(AnyString, 2) & "000"

Chris Nebinger
 
I agree it's got to be a problem with the project
references. Will the code compile on the bad machine? If
not, make a backup copy of your file, then try removing
the references and re-referencing them. Is the 'PdfLib' a
reference to Adobe Acrobat? Does the 'bad' machine have
that installed? I'm thinking there may be improperly
registered .DLL files on the bad machine.
 
Just FYI:

I created a dummy table containing one field, SubAddress, and a form based
on that table containing two text boxes: one called txtSubAddress bound to
the SubAddress field, and the other unbound called txtEnter. I pasted your
code exactly as you gave it and ran the form. It worked fine for me, as you
would expect. Perhaps a bad DLL? On the bad machine, open an Immediate
window in VBA and enter the statement,

? Left("Test", 2)

If it generates your error, then it might help to pin down the cause?
Perhaps more knowledgeable people here can comment on this idea...

--

Brian Kastel


--Original Message----------------

Thanks for the info.
I thought that was it but still a no go! I have checked
version and also setup a fix.BAT file to transfer the
file to the location on the PC. I aslo checked references
and got them to match up. All are loaded. I looked at the
system files and all are loaded.

References VBA, Access, stdole, ADODB, PdfLib
Current user Admin
Jet version 4.0

Still errors on the LEFT statment in the code. Still lost
for ideas.
-----Original Message-----
this is usually a references problem.
On your good system open the code window (alt- F11),select
tools - references.
Select each in turn, not the path and filename, and the
order in which they appear in the list.
Go find each file in explorer, and note its version number.

Repeat the same exercise on the bad machine.
Check the order first, then make sure that none are
missing, finally repeat the version exercise.


.
..
 
Back
Top