Access 97 => 2003

K

KarenFio

I converted an Access 97 database to 2003 and a form that uses the following
code to choose a start date for a report did not work:

Private Sub TDDReportTime_AfterUpdate()
Select Case Me.TDDReportTime
Case 1
MyStartDate = DateAdd("d", -1, Date)
Case 2
MyStartDate = DateAdd("d", -2, Date)
Case 3
MyStartDate = DateAdd("d", -7, Date)
Case 4
MyStartDate = DateAdd("d", -14, Date)
Case 5
MyStartDate = DateAdd("m", -1, Date)
Case 6
MyStartDate = DateAdd("m", -2, Date)
Case 7
MyStartDate = DateAdd("m", -3, Date)
Case 8
MyStartDate = #10/1/2004#

Case 9
MyStartDate = #10/1/2005#
Case 10
MyStartDate = #10/1/2006#
Case 11
MyStartDate = #4/15/2006#
Case 12
MyStartDate = #10/1/2007#



End Select
Me.Requery


The text box that should display the date has the message "#Name?".

Access 2003 keeps crashing with the converted database. I have tried
turning of Name AutoCorrect.

Any suggstions would be greatly appreciated. Thanks.
 
W

Wayne-I-M

Hi

this works fine when testing - I just ran it on a small unbound form and it
seems OK. They may be another problem not connected with this option group




Option Compare Database
Option Explicit

Private Sub TDDReportTime_AfterUpdate()
Select Case Me.TDDReportTime
Case 1
MyStartDate = DateAdd("d", -1, Date)
Case 2
MyStartDate = DateAdd("d", -2, Date)
Case 3
MyStartDate = DateAdd("d", -7, Date)
Case 4
MyStartDate = DateAdd("d", -14, Date)
Case 5
MyStartDate = DateAdd("m", -1, Date)
Case 6
MyStartDate = DateAdd("m", -2, Date)
Case 7
MyStartDate = DateAdd("m", -3, Date)
Case 8
MyStartDate = #10/1/2004#
Case 9
MyStartDate = #10/1/2005#
Case 10
MyStartDate = #10/1/2006#
Case 11
MyStartDate = #4/15/2006#
Case 12
MyStartDate = #10/1/2007#
End Select
End Sub
 
K

KarenFio

Thanks for testing it. I'll have to see what else it might be.

Another thing I forgot to mention which is probably more urgent is that I
can't open, go into design view, or print preview any of my reports in other
databases created in Access 2003 after I converted this database. I can
still do everything in Access 97.

Any suggestions or ideas would be appreciated.
 
W

Wayne-I-M

I think (just my opinion) that the best site you can look at for 97 -> 2K3 is
this

http://allenbrowne.com/ser-48.html

Have a look and see what you can find. Sorry can't be much help as I have
never seen your problem with the design view. When we converted (back in the
day) it seemed to go quite smoothly
 
K

Klatuu

I think you have a VBA Library Reference problem. When you change version,
the library files the old version was using may be no longer on your system
or they may not work with the current version.

When you change versions, check your references to ensure they are not
missing and that they are using the correct version of the library.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top