473,320 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problems with commands Date(), Left(), Mid() and Right()

Dear readers,

Is there some one who knows the solution of the problem caused by the
reference libraries in the VBA code. If you run an application on an alien
PC it seems everything is OK. But by running the commands Date() or Left(),
Mid() en Right() an error massage pops up which tells you "unknown command".
But the real problem is the reference library which sows in the VBA | Tools
| Reference form that there is not a missing link but after disconnect the
library and reconnect the library with the next restart everything works
normal also the command Date(), Left(), Mid() and Right().

Is there some on who knows an easy whey to disconnect and reconnect a
library if you start running on an alien PC.

Thanks for any help.

Kind regards,

Simon van Beek
Nov 18 '06 #1
1 3241
Simon, you can't really add/remove references programmatically, since the
code depends on the references. As soon as VBA discovers a reference is
missing (any reference, even if the executing code is not using it), you're
shot.

michka has an article explaining this:
How to guarantee that references will work in your applications
at:
http://www.trigeminal.com/usenet/usenet026.asp?1033

Workarounds:
a) Don't use any references you really don't have to.
If you can limit it to the standard 3 only, you're usually safe.
Details of which they are for each version of Access:
http://allenbrowne.com/ser-38.html

b) Use late binding where applicable, so your app is not tied to specific
versions. Details:
http://support.microsoft.com/kb/260410/en-us
http://support.microsoft.com/kb/239930/en-us

c) It would be possible to create a batch file to run regsvr32 to unregsiter
and/or register libraries if that helps you when you change computers.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Simon" <Sv********@Versatel.nlwrote in message
news:45***********************@news.tele2.nl...
Dear readers,

Is there some one who knows the solution of the problem caused by the
reference libraries in the VBA code. If you run an application on an alien
PC it seems everything is OK. But by running the commands Date() or
Left(),
Mid() en Right() an error massage pops up which tells you "unknown
command".
But the real problem is the reference library which sows in the VBA |
Tools
| Reference form that there is not a missing link but after disconnect the
library and reconnect the library with the next restart everything works
normal also the command Date(), Left(), Mid() and Right().

Is there some on who knows an easy whey to disconnect and reconnect a
library if you start running on an alien PC.

Thanks for any help.

Kind regards,

Simon van Beek

Nov 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Quintus Snapper | last post by:
How can I convert a string such as 25062002120236 into a date (25-06-2002 12:02:36). I have tried using the CDate() & ISDate() functions but they don't recognise and convert this into a date. ...
2
by: John Ortt | last post by:
Hi All, I have a database in Access 97 which works fine but our company is converting from NT4 to XP Pro and in the process changing Office 97 for Office 2003. I have tried to convert the 97...
4
by: Annie D via AccessMonster.com | last post by:
Problem! I have a series of CSV files that I am bringing in to Access, contained within each of them are 6 date fields, however, they are not being recognized as dates…this is a big problem!...
1
by: MLH | last post by:
I want to change my system time date each time an A97 app is started. Here's how I've been doing it. Am looking for a better way. Sure some of you have researched this. Function...
18
by: Jm | last post by:
Hi all I feel stupid for asking this, but i just went to use the left() function from vb6 only to find it doesnt do what it used to under .NET. Im assuming theres something else now im meant to...
3
by: levinepw | last post by:
I can convert a yymmdd to (yymmdd - 1 day) What I do is take the existing yymmdd string, convert it to a mm/dd/yyyy date and subtract a day from it & then format it back into yyymmdd. But the...
5
by: mabond | last post by:
Hi Having trouble filling a datetime filed in SQL table with a value from an array. The original source is a comma-delimited text file where the date and time values are in two columns. I...
1
by: Simon | last post by:
Dear readers, Is there some one who knows the solution of the problem caused by the reference libraries in the VBA code. If you run an application on an alien PC it seems everything is OK....
1
by: Beckster6701 | last post by:
I have a MSAccess database that is linked to a SQL server. I cannot change the SQL server datatype as I am not the only one that uses the database. I'm trying to convert the text field to a valid...
0
by: =?Utf-8?B?QnJ5YW4=?= | last post by:
Hello group. I've migrated from Win 2003 server to Win 2008 server. I've been banging my head agaist a wall for several days now trying to figure this out. I have the following script that will...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.