Microsoft Access 2k to XP differences

  • Thread starter Thread starter cb
  • Start date Start date
C

cb

My end-users are in 2k, but I have been working in XP for a while now with
no problems up till now -

Two coding issues I am running into -
1) Forms and reports are no longer working in some instances - simply
nothing happens when I click buttons with events. When I compile the VB, I
am consistsently getting an error on these lines of code:
Set Admissions = CurrentDb OR
Set Admissions As CurrentDb

2) The second issue has to do with filtering based on dates. Date filters
that used to work, now require this workaround -
RTrim(Left([Request_Date],9)). Some how MS Access used to automatically
ignore (or strip) the hh.mm.ss am/pm from the date, but now I have to
manually force this to occur.

Any insight on these (the first one in particular), I would appreciate it.

Thanks,

Chris
 
1) CurrentDb is a DAO object. Make sure you have a reference to the DAO
Object library set (VBEditor: Tools> References). ADO became the "default"
data object library, but you can still use DAO as long as you set the
reference.

You will also probably find it advisable/necessary to disambiguate your
object references:
Dim Admissions as DAO.Database
Database is an object in both the ADO and DAO libraries, so it is a good
idea to be specific. Even if you deselect the ADO reference today, you
might need it tomorrow.

2) If the RequestDate was a true date field you could simply use
Int(RequestDate) or Fix(RequestDate) for comparisons (the functions work
identically on positive numbers). A Date/Time data type is simply a number
where the Integer portion represents the date (one day = 1) and the
fractional portion is the time of day.

HTH,
 
Back
Top