That dreaded

  • Thread starter Thread starter WSF
  • Start date Start date
W

WSF

Access97
As part of the loading routine of a report front end I have the following:

DoCmd.RunSQL "SELECT tbljobdata.JobId as JobNo , tbljobs.CustomerId
as Acct, tbljobs.[Date Received] as DateIn, tbljobs.OrderNo,
tbljobs.Make, tbljobs.Model INTO tblHistory IN '" & ReportsTempDBase &
"' From tbljobs WHERE (((tbljobs.[Date
Received])>=DateSerial(Year(Date()),Month(Date())-6,1)));"

This takes 6 months of selected fields from records from the main data
file [tbljobdata] (linked) and creates a table [tblHistory] in a
separate datafile.

This has worked fine on several PC's for months. But I have this one
pesky PC's recently built (not by me!) and the routine gets stuck here
with an error regarding the function Date. When the module completes and
the main form opens all the date fields in the forms display #Name.
There is no conflict in the fields' naming conventions etc - I am wise
to that and pretty careful.

I have checked the references on the subject PC and they appear fine.

Driving home, I did think that it could be the Access97 install (maybe
some option left out) or the Office install may not have the SR1/2 done.

I'll try that tomorrow, but would appreciate any help.
I reckoned on a missing reference but there is none.

Cheers,
Bill
 
Darn it - clicked the Send button before completing the Subject
"That dreaded Date vs #Name thing"
:-)
WSF
 
Nope!
I've gone through to SP2B for Office97 and still an issue.
It is obviously associated with the particular PC because I have the MDB
running okay on other PC's.

The chap who has set up the PC is a bit miffed - "not me" he says.
Like hell, I say.

It will be something obscure or obvious!

WSF
 
Any time an application works on one machine but not on another, or suddenly
stops working, the first thing to suspect is a References problem.

This can be caused by differences in either the location or file version of
certain files between the machine where the application was developed, and
where it's being run (or the file missing completely from the target
machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)

For far more than you could ever want to know about this problem, check out
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html
 
Back
Top