Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Query again....help

Status
Not open for further replies.

BADSBRD

IS-IT--Management
Dec 26, 2003
34
0
0
US
I am trying to do a simple query. I need to find the users added to the table in the past 30 days.

I've tried these:
Between Date(now)-30 And Date(now)
Result: I get "function not available"

Between Month(now)-1 And Month(now)
Result: I get no records

>=Month(now)-1 And Month(now)
Result: I get no records

>=Month(now)-1
Result: I get all the records

>=Date()-30
Result: I get "function not available"

Can someone help me?
 
And this in the criteria cell of the Date field column ?
>=Date - 30

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I get a Data type mismatch in criteria expression
 
What is the data type of the table's field ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
You have no field nor alias nor table named Date ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
The table is: Users
The Field is: Added Date
The data type of that field is: Date/Time
The default value of the field is: Now()

PS. I'm a newbie at this access stuff
 
and what about this in the criteria cell of [Added Date]:
>=VBA.Date() - 30

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Message: You have entered a comma without a preceding value or identifier
 
Nevermind, VBA.Date() will raise an error, my bad.
One correct way is:
>=Date() - 30
If you still get "function not available" then check the references:
while in VBE (Alt-F11) menu Tools -> References ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Even if you quit access and reopen your database ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Yes,

Does it make a difference if this is a mde and not a mdb?
 
Sure as you aren't allowed to play with VBA in a mde.
Are you sure the mde is open with the same access version as the original mdb ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Can you give me a quick course on mdb vs. mde
When you create a MDE does the MDB still exist?
If so, how do I tell what MDB its linked to?

Thanks for all your help...

 
I found out that a consulting company built this MDE for us years ago. There is a MDE for Access 97 and a MDE for Access 2000. I opened the MDE for 97 and was able to execute the query. Now, how do I create a new Access 2000 MDE from the 97 version??
 
how do I create a new Access 2000 MDE from the 97 version?
You can't.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I found 32 MDB files in the same directory as the MDE. db1.mdb through db32.mdb. They all open to the same switchboard as our MDE files. Is this crazy or is this good database design?

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top