Runtime ERR 3075 in VISTA

D

Dave180

If I add a new WHERE clause to a SELECT query the query definition will
not be saved.
Any existing query with a clause, when run, returns a runtime error 3075

A table with say RECNAME, RECDATE and RECADDRESS fields will list all
records if I SELECT them.
But if I want say records WHERE RECDATE <DATE()-10 then I cannot save the
definition/the query would not run.

I've copied my 2003 database from an XP machine where everything runs
fine.

I think I'm also going to have dlookup problems along similar lines ...
but that (may be another thread!)

Any help gratefully received.
Regards,
Dave.
 
D

david

What exactly is the error message? 3075 is generic: the text varies
according to what goes wrong.

Anyway, is it any WHERE clause, or only clauses that include
function references like DATE( )?


(david)
 
D

Dave180

Many thanks David,
Apologies for not providing sufficient info on this problem.
Here goes ...

I originally excluded the 3075 text because it appears in different forms
across the DB.
(That'll be the Generic bit I presume - how useful!)

The first instance, of the error, occurs when my Application OPENS the
Switchboard Form and, depending on the results of the Query, called during
the SB Form's ON OPEN Event, displays a warning to the user in a TxtBox on
the SB, that Tasks are outstanding.
Under XP the result is a Txtbox with either nothing in it - or a text string
representing the warning.
Under VISTA the Application always starts and fails

Message reads ...

Run-time error 3075

Function is not available in expressions in query expression
'(((TblTasks.TaskDate)<Date()) AND ((TblTasks.Done)=0) AND
((TblTasks.Cancelled)=0)) OR (((TblTasks.TaskDate=Date()) AND
((TblTasks.Done)=0) AND ((TblTasks.Cancelled)=0) AND
((TblTasks.TaskTime)<Time()))'

....end of Message (I think I typed that lot correctly!)
The original query was written using the Query Design Grid in Access 2003
under Windows XP
(TaskDate and TaskTime are Date Fields, the others are boolean)
(The Query is designed to report - Is there an OS Task due earlier than
today or earlier than Now today)

- - -

To determine the scope of this problem I created a new DB in VISTA.

This had one Table and one Query as per my original problem description; viz.
[AutoID] and RECName, RECDate and RECADDL1
Records were added with past, future and Null dates in the RECDate field.
All other fields were filled on all records.

The SELECT Query listed all records successfully.
When the WHERE clause was added; RECDAte <Date()
only the past records were selected successfully.

I then Imported/Exported these objects into my Application DB.
Running the SELECT Query with no Criteria returned all records in the Table
successfully.

Running the query with WHERE RECDate<Date() returns the error ...

Function is not available in expressions in query expression
'(((Tbl1.RECDate)<Date()))'

A view of the Query Design shows that the Criteria has been removed.

I then added the Criteria WHERE RECName = "Dave"
The query returned the one valid record successfully.

To this query I then re-added the clause WHERE RECDate<Date()
The Query Design errored with ...

The function you entered can't be used in this expression
* You may have used a DoEvents, LBound, UBound Spc or Tab function in an
expression
* You may have used an aggregate function, such as Count, in a design grid
or in a calculated control or field

- - -

SO - from these results I can assume that the problem exists ...
----------------------------------------------------------------
o Only in my Application
o Only for 'Functions', whatever that may ultimately entail!
o Only when my Office 2003 Application is copied to VISTA

Removing the above SB Tasks Query from the SB load process results in
further similar instances of the problem throughout the Application.
If I can understand the cause of this one then I can, perhaps, deal with
those in turn.

Everything was copied from the happily-running XP instance of the
Application to the VISTA machines, including User Security files etc.
Is this an Environment issue I have with my Application under VISTA?
Whatever! How do I fix it?

Regards,
Dave.
 

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