473,659 Members | 2,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2069
"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******** ************@ma gma.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*****@REMOVE THIScomcen.com. au> wrote in
news:40******@n exus.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 "Catastroph e"?

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #4
Lyle Fairfield wrote:
"Bradley" <br*****@REMOVE THIScomcen.com. au> wrote in
news:40******@n exus.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 "Catastroph e"?


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.recordsetcl one.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*****@REMOVE THIScomcen.com. au> wrote in message
news:40******@n exus.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@epsomdot comdotau> wrote in
news:40******** *************** @news.syd.swift dsl.com.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********@bwa y.net.invalid> wrote in message
news:Xn******** *************** **********@24.1 68.128.86... "david epsom dot com dot au" <david@epsomdot comdotau> wrote in
news:40******** *************** @news.syd.swift dsl.com.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
2708
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 this or possibly some starter code? I am just so sick of the syncronization problems that come into play when you adjust underlying tables and queries offline and then have to overwrite the live database? Many thanks Jason
20
4628
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 4 to Service Pack 7 2) Set Subdatasheet Name to from 3) Shortened the file name of the .MDB file 4) Made sure the Track name AutoCorrect info is off
2
1652
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. also would appreciate if anyone can give pointers on using VSS with ms access 2000, how to handle multiuser issues when it comes to insert, update and delete.
1
1874
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 works fine. I thought this is not tooo bad so far. BUT everyone else in the co that got a copy and converted it on their system had big problems. First when they ran the database a vb code view window was open in the background. Second some of...
3
7220
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 conversion" it looks like it is due to the DAO 2.5/3.5 reference. Is there a conversion utility that I can run to convert it to DAO 3.6 to run in Access 2000 There seems to be a lot of changes required in the module where it is using
2
2327
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 database? Why you ask! A client has a 2000 database. Currently using 2000 runtime for most employees to work with database. A couple use 2003 to use database, no problems. They have a mix of versions of other products such as Word, Excel - 97,...
12
2251
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 little about 97, however, from everything I read, it sounded like a conversion from 97 to 2000 should go smoothly. Boy was I wrong. Here's what we got. There is a form, that lists a group of employees. There is a command button, that when...
17
4403
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 there, but is there a way they can find out if that application was put there from a CD or email or created at work? Hint: It's not on a client/server database, just native jet database mdb created on Access 2003 (default 2000)...
4
2340
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 code / queries ran slow due to access running the queries locally rather than on the server). And tested it on my and my boss's machine with no problems so he gave the go ahead to update everybody to our new mssql 2000 backend with the modified...
3
2738
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. When converting the front ends I get the following issues and error. If I try to import all the objects into a blank Access 2003 shell I get a missing reference error for Outlook 2000, Excel 2000, and Word 2000 or after importing all the objects...
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8751
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7360
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4342
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2759
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.