473,378 Members | 1,523 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,378 software developers and data experts.

Access 97/2000 conversion problems

First of all I have been working with Access 97 and this morning the owner
of the business phoned me to inform me that he had updated to Access 2000
and parts of my forms would not work anymore.

On my form I have a field "Expiry Date".When I put the following into the
AfterUpdate field, it adds 183 days to the current date, and displays it in
the "Expiry Date" field.

Me.ExpDate = DateAdd("d", 183, Me.Date)

Then I have a "Lot Number" that only exists on the form. When the date is
entered it produces a whole number that comes up in the "Lot Number" field.
This is done by pasting the following formula in the in the "Control
Source" field on the Data Tab of the "Lot Number" field.

=Right(Year([Date]),1) & Right("000" & Format([Date],"y"),3)

What changes do I have to make to make the above Access 2000 compatible.

Any help would be appreciated.

Thank you,

--
William Bradley
Come visit us at:
http://www.catholicmissionleaflets.org
Free Rosaries available at the above.
Nov 12 '05 #1
8 2051
"Date" is a reserved word -- the builtin Date function returns the current
date -- and it is not good to use reserved words for the name of a Field, or
a Control. It is also not good to use the name of the Field for the Control
in which it is displayed, because it is confusing to us whether it is the
Field or the Control that is being referenced.

Access 2000 is "stricter" about some things of this kind than Access 97 is.
I'd guess if you changed these things, it would be a start. At least the
issue wouldn't be confused with some things that can, but don't always,
cause a problem.

Also, be sure you have a clean compile before you convert, and be sure you
are running all the Service Packs for Access 2000 (there are now three SPs
and, perhaps, a few hot-fixes). A trip to Office Update would be a good
idea, just to make sure... it's an option on the Windows Update screen that
you see when you click Windows Update in the Start Menu.

Larry Linson
Microsoft Access MVP
"William Bradley" <br******@magma.ca> wrote in message
news:QI********************@magma.ca...
First of all I have been working with Access 97 and this morning the owner
of the business phoned me to inform me that he had updated to Access 2000
and parts of my forms would not work anymore.

On my form I have a field "Expiry Date".When I put the following into the
AfterUpdate field, it adds 183 days to the current date, and displays it in the "Expiry Date" field.

Me.ExpDate = DateAdd("d", 183, Me.Date)

Then I have a "Lot Number" that only exists on the form. When the date is
entered it produces a whole number that comes up in the "Lot Number" field. This is done by pasting the following formula in the in the "Control
Source" field on the Data Tab of the "Lot Number" field.

=Right(Year([Date]),1) & Right("000" & Format([Date],"y"),3)

What changes do I have to make to make the above Access 2000 compatible.

Any help would be appreciated.

Thank you,

--
William Bradley
Come visit us at:
http://www.catholicmissionleaflets.org
Free Rosaries available at the above.

Nov 12 '05 #2
William Bradley wrote:
First of all I have been working with Access 97 and this morning the
owner of the business phoned me to inform me that he had updated to
Access 2000 and parts of my forms would not work anymore.

On my form I have a field "Expiry Date".When I put the following into
the AfterUpdate field, it adds 183 days to the current date, and
displays it in the "Expiry Date" field.

Me.ExpDate = DateAdd("d", 183, Me.Date)
I think you should use the "correct" syntax... the "dot" operator is
used for methods/properties of the object eg. Me.Visible. For fields
use an apostraphy.

Me![ExpDate] = DateAdd("d', 183, Me![Date])

Also 'date' is a reserved word. Try calling your field something else.
Then I have a "Lot Number" that only exists on the form. When the
date is entered it produces a whole number that comes up in the "Lot
Number" field. This is done by pasting the following formula in the
in the "Control Source" field on the Data Tab of the "Lot Number"
field.

=Right(Year([Date]),1) & Right("000" & Format([Date],"y"),3)

What changes do I have to make to make the above Access 2000
compatible.

Any help would be appreciated.

Thank you,


--
regards,

Bradley
Nov 12 '05 #3
"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in
news:40******@nexus.comcen.com.au:
William Bradley wrote:
First of all I have been working with Access 97 and this morning the
owner of the business phoned me to inform me that he had updated to
Access 2000 and parts of my forms would not work anymore.

On my form I have a field "Expiry Date".When I put the following into
the AfterUpdate field, it adds 183 days to the current date, and
displays it in the "Expiry Date" field.

Me.ExpDate = DateAdd("d", 183, Me.Date)


I think you should use the "correct" syntax... the "dot" operator is
used for methods/properties of the object eg. Me.Visible. For fields
use an apostraphy.

Me![ExpDate] = DateAdd("d', 183, Me![Date])


Don't you mean "Catastrophe"?

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #4
Lyle Fairfield wrote:
"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in
news:40******@nexus.comcen.com.au:
William Bradley wrote:
First of all I have been working with Access 97 and this morning the
owner of the business phoned me to inform me that he had updated to
Access 2000 and parts of my forms would not work anymore.

On my form I have a field "Expiry Date".When I put the following
into the AfterUpdate field, it adds 183 days to the current date,
and displays it in the "Expiry Date" field.

Me.ExpDate = DateAdd("d", 183, Me.Date)


I think you should use the "correct" syntax... the "dot" operator is
used for methods/properties of the object eg. Me.Visible. For fields
use an apostraphy.

Me![ExpDate] = DateAdd("d', 183, Me![Date])


Don't you mean "Catastrophe"?


hehe ;)

--
regards,

Bradley
Nov 12 '05 #5
> I think you should use the "correct" syntax... the "dot" operator is
used for methods/properties of the object eg. Me.Visible. For fields
Which is why 'dot' can be used for the object properties that refer
to controls on the report, and to fields in the bound recordsource.

An advantage of using the form properties, instead of using members
from the fields collection or the controls collection, is that you
get 'autocomplete'. Another, more important advantage, is that you
get compile time syntax checking for form properties, which you do
not get for membership of collections.

Disadvantages of using field properties of a form are (1) 'Field'
properties are not created correctly when using LoadFromText,
(2) 'Field' properties are not available for late-bound recordsources.

I am not aware of any disadvantages to using 'control' properties.

I use the form properties when referring to a control on a form,
and use the default collection when referring to a field from the
recordsource (this gives me an additional visual indication for
when I am using a field without a bound control, and is tolerant
to forms that are unbound at compile time).
When I use the default collection of the form (frm!....) I
can refer both to controls and to unbound fields. There is no
overlap if I use the fields and controls collections (frm!controls!...
frm.recordsetclone.fields!...) By what magic is this possible?
I would think that perhaps using the default collection is a
kludge that should be avoided ????

(david)

"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message
news:40******@nexus.comcen.com.au... William Bradley wrote:
First of all I have been working with Access 97 and this morning the
owner of the business phoned me to inform me that he had updated to
Access 2000 and parts of my forms would not work anymore.

On my form I have a field "Expiry Date".When I put the following into
the AfterUpdate field, it adds 183 days to the current date, and
displays it in the "Expiry Date" field.

Me.ExpDate = DateAdd("d", 183, Me.Date)


I think you should use the "correct" syntax... the "dot" operator is
used for methods/properties of the object eg. Me.Visible. For fields
use an apostraphy.

Me![ExpDate] = DateAdd("d', 183, Me![Date])

Also 'date' is a reserved word. Try calling your field something else.
Then I have a "Lot Number" that only exists on the form. When the
date is entered it produces a whole number that comes up in the "Lot
Number" field. This is done by pasting the following formula in the
in the "Control Source" field on the Data Tab of the "Lot Number"
field.

=Right(Year([Date]),1) & Right("000" & Format([Date],"y"),3)

What changes do I have to make to make the above Access 2000
compatible.

Any help would be appreciated.

Thank you,


--
regards,

Bradley

Nov 12 '05 #6
Larry Linson wrote:

Thank you to everyone who responded to my problem. I finished by creating a
fresh DB in Access 2000. It was not as though I had a big system to deal
with. The main reason was that I could not get a clean compile when 2000
was trying to update 97's DB. Once I did that, took not of what was told me
about the date being a reserved word, everything began to work as expected.

Thanks again, Bill.
"Date" is a reserved word -- the builtin Date function returns the current
date -- and it is not good to use reserved words for the name of a Field,
or a Control. It is also not good to use the name of the Field for the
Control in which it is displayed, because it is confusing to us whether it
is the Field or the Control that is being referenced.

William Bradley
Come visit us at:
http://www.catholicmissionleaflets.org
Free Rosaries available at the above.
Nov 12 '05 #7
"david epsom dot com dot au" <david@epsomdotcomdotau> wrote in
news:40***********************@news.syd.swiftdsl.c om.au:
I am not aware of any disadvantages to using 'control' properties.


If you mean referring to controls using the . operator, here are
some:

1. you are depending on the behavior of something over which you
have no control: VBA creates a hidden wrapper around each controls
that allows you to treat them as properties/members of the form.

2. in certain circumstances, the dot operator can lead to corruption
of the form. I've lost track of what those circumstances are,
though. Steve Jorgensen experienced one case of it, I think.

3. code written using the ! operator is easier to read, as it tells
you you're referring to a control or field.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #8
> 1. you are depending on the behaviour of something over which you
have no control: VBA creates a hidden wrapper around each controls
Whereas when I refer to the 'visible' property of a form
I am depending on the behaviour of something over which I
do have control? And when I refer to the magic default
collection of the form I am depending on the behaviour of
something over which I do have control?
2. in certain circumstances, the dot operator can lead to corruption
of the form. I've lost track of what those circumstances are,
though. Steve Jorgensen experienced one case of it, I think.
Steve experienced a lot of corruption when he started using
Access 2000: Later, he didn't get as much corruption. The
same thing happened to me... I stopped using MDE libraries:
I couldn't get them to work reliably at all. He stopped using
form properties. Now, we have all our libraries back again,
and we continue to use dynamically created form properties as
well as public form variables, Let, and Get.

AFAIK, Steve never posted 'circumstances' that led to corruption,
except that developing VBA in Access 2000 can lead to project
corruption, and project corruption can lead to database
corruption. Always close and save after making changes: never
modify a form opened in view mode: always decompile after
setting break points: close, backup and decompile often.
Steve has gone on to write elaborate code to replace the
functionality of form properties: it would not be appropriate
to advise people to just abandon the use of form properties.
3. code written using the ! operator is easier to read, as it
tells you you're referring to a control or field.
Code written using the ! operator is more difficult to read,
as it obscures the difference between controls and fields.

(david)



"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:Xn*********************************@24.168.12 8.86... "david epsom dot com dot au" <david@epsomdotcomdotau> wrote in
news:40***********************@news.syd.swiftdsl.c om.au:
I am not aware of any disadvantages to using 'control' properties.


If you mean referring to controls using the . operator, here are
some:

1. you are depending on the behavior of something over which you
have no control: VBA creates a hidden wrapper around each controls
that allows you to treat them as properties/members of the form.

2. in certain circumstances, the dot operator can lead to corruption
of the form. I've lost track of what those circumstances are,
though. Steve Jorgensen experienced one case of it, I think.

3. code written using the ! operator is easier to read, as it tells
you you're referring to a control or field.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc

Nov 12 '05 #9

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

Similar topics

24
by: jason | last post by:
Hi Ray...a while ago you explained an elegant solution to enable me to CREATE and EDIT existing tables and queries inside my online access 2000 database.... could you provide refresher links on...
20
by: John | last post by:
Hi, I've recently upgraded from Access 97 to Access 2002 & the performance basically stinks. I have tried the following items listed below but it has only had a minor impact: 1) Upgraded Jet...
2
by: bala | last post by:
hi access gurus would appreciate if u can give me pointers regarding conversion of ms access 97 application to ms access 2000, like what are the problems to be expected and how to handle it. ...
1
by: sparks | last post by:
I have done a LOT of databases in access 97 but I am new to access 2000. We are S L O W L Y converting over. Yesterday I had a 97 database that I had to run the converter to 2000 and everything...
3
by: Derek Riley | last post by:
I have been using Access97 for some time now and decided to upgrade to 2000, the problem is when I convert it to 2000 I get the following message "There were compilation errors during the...
2
by: Jeff | last post by:
Does anyone know of any potential problems running a 2000 database with 2003? Also, what about installing all other Office products as 2003 versions but leaving Access as 2002 running a 2000...
12
by: Cy | last post by:
Hello Fellow New Group Folks, Here's today's problem. I was called in to help convert an Access 97 database to Access 2000. 99% of all my Access Dev. work has occurred in 2000, so I know very...
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
4
by: ThePhenix | last post by:
Hi everybody, I have recently been doing a conversion for my boss for a access 2000 database (both front and backend) to a MSSQL backend. I finished the conversion today (as quite a lot of the...
3
by: NEWSGROUPS | last post by:
I am in the midst of trying to convert about 25 Access 2000 to Access 2003. The new environment consists of Office/Access 2003 and Outlook 2003. When converting the back ends I have no problems....
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.