Date / Time With A Wild Card As Criteria In Query?

Apr 21, 2015

How may I write a criteria in the query where I can pull records with date/time data type (01/31/15 1:30:23 PM) based on today's date?

Example using today's date (4/21/15):

Date()= 4/21/15

The query will pull these records:
ABC 4/21/15 9:14:40 AM
DEF 4/21/15 10:50:02 AM
GHI 4/21/15 2:32:35 PM
etc.

The time does not matter as long as the date is 4/21/15.

I have tried using these formulas:
=Date() & *
=Date(Now)

but these are no success.

View Replies


ADVERTISEMENT

Using A * (Wild Card) In Pop Up Box?

Aug 3, 2004


Is it possible to use a * (Wild Card) in a pop up box for a query?

I read the previous post about pop up boxes for quires and it worked worked great! I created one for my month field

My criteria in my search fieled is a follows:
05-May
06-June
07-July
08-August
etc...

As you can see someone would have to type a 08-August to get the results for August, can a wild card be used? Example 08* would return all of 08-August data. I tried it but it wouldn't return any data.

Any help would be appreciated.

Thanks, Scott

View 6 Replies View Related

Wild Card In IIF Statement

Jan 28, 2008

I am using a criteria entry form as the source of parameters for a select query, and I am using IIF statements in the query so that if the user does not want to specify for that particular field, the search still works based on the other parameters specified. Therefore the statement I am using is;

IIf([Forms]![Criteria Form]![Customer Account] Is Not Null,[Forms]![Criteria Form]![Customer Account],[Data]![Customer Account]).

This works.

However for some of the criteria I want to also use wild cards, so that the user can enter just part of the data, and the relevant records will be returned. I understand that wild cards cannot be embedded into the IIF statement above.

I have tried many methods, and trawled the web for ideas, but I cannot get this to work. I either want the user to enter the wild card themselves ie "100*" returning records starting with "100", or for the query to append the wild card itself.

Can someone help please?

View 7 Replies View Related

Wild Card Name Searching Help

Feb 27, 2008

How would I make a query find a person like this:

Inputted Data: Smit
Outputted Data: Smith, Smithy etc..

The formula I have entered in the criteria of my query is:
Like [Enter the person's last name]

With this formula, if I type Smith, then the data that comes out is Smith. But if I type in smit or smi, Smith doesnt come out.

Thanks.

View 4 Replies View Related

Wild Card Searches

Jun 22, 2005

Ive read loads of posts about Wildcard searches but am unable to find the answer to my problem. In one of my boxes on my search form the user places in the search criteria value, this can be from A1 - A16 all the way to G16. At the moment i'm using this as my seasrch query:

[Forms]![Search]![BoxNo]

So if I put in C1 then I get all the C1's, great. If I want to wildcard then I put in Like "*" & [Forms]![Search]![BoxNo] &"*", and again it works, this time it call enything with C1 in it i.e C13.

How can I adjust my query to do both, sometimes I only want the exact match othertimes I want to wildcard :confused:

View 4 Replies View Related

Wild Card On Search Form Issue

Nov 3, 2007

Hi all,

I need a little help with a wild card issue, Ive looked and looked and cant spot whats wrong.

I have two forms "Requisitioner" & "Engineers", each form has a subform.
These are basic search forms (unbound) that find related records in the subforms. The work is done in the query of the subform and then the form is refreshed. I have used this approach many many times without issue until now.

If the engineers form is opened "G*" is entered into the text box then all the entries beginning with "G" are found in the subform.

If the "*" is then removed from the text box leaving "G" no results are found in the subform, (Working Correctly)

Now if the "*" is added again "G*" then the subform shows all the entries beginning with "G"


Everything is good with the Engineers Form, If the same steps are made on the Requisitioners form after adding the "*" again no records are displayed.

I could change the way this works by doing a recordset find but i really want to know why this is working on one form but not on another.

I would appreciate any help with this.

Garry

View 1 Replies View Related

Queries :: Wild Card Searches With Brackets

Jun 26, 2014

I want to prompt the user to enter a merchant name, but want the results to return close matches.I know how to use the wildcard in the Criteria field of the query, but I want to use brackets.I know that "*Southwest*" Will return Southwest Airlines.So I tried *[Southwest Airlines]* and it treats the criteria like a text string.

View 1 Replies View Related

Forms :: Hyphen Not As Wild Card Character

May 18, 2013

I have a series of dates that I inherited from former DB. Some of the dates are Mon-Fri, Mon-Thu, Sun-Fri, etc. That is, there is a hyphen "-" in the middle of the text. I have an unbound control with an IIF statement using the LIKE condition, I just get an error. I tired the following to no avail. Using Access 2010.

IIF([Day1] Like "*-*", 5, 1)
IIF([Day1] like "-", 5, 1)
IIF ([Day1] like '-', 5, 1)
IIF ([Day1] like [-], 5, 1)

I've looked it up and the hyphen _ is used as a wild card character, but I need to include it just as a dash.

View 3 Replies View Related

Converting Filter From Wild Card To Extact Match

Aug 30, 2006

I have a search box and it looks up project id number.
the orginal code works but filters anything with that particular number.

I like to adjust the filter to equal to the number enter.

ex,, I enter 22 , i get records with 622, 223, etc
I want it to be only 22

I can't seem to figure this out.. here's te code

Private Sub txtSearchString_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

LSearchString = txtSearchString

'Filter results based on search string
LSQL = "select * from [Projects - Active]"
LSQL = LSQL & " where ID LIKE '*" & LSearchString & "*'"

Form_frmSearch_sub.RecordSource = LSQL

lblTitle.Caption = "Project ID: Filtered by '" & LSearchString & "'"

'Clear search string
txtSearchString = ""

End Sub

View 6 Replies View Related

Hard Code TIME To Selected Date On Form (to Make It Date&time) For My Query Criteria

Aug 17, 2006

Hello buddies :D, do you have any idea how to make this work?

To select data that falls within this criteria of date range between cboDate and cboDate2 (fields on my form). The date in [tblJobDetails]![timeIn] come in this format "08/17/06 10:24 AM", but the cboDate/cboDate2 (takes in date only e.g 08/17/06) what i am after is to evaluate specific hard coded time in addition to the date entered, i.e. even tho, i haven't entered time on the cboDate/cboDate2, I want specific time hard coded where e.g If i select a date range of 08/17/06 and 08/18/06 on my cboDate and cboDate2 it should really be evaluating: 08/17/06 8:00 AM to 08/18/06 8:00 AM.

This is the criteria i curentlly have on my query in design view tha works perfect in selecting date only.
([tblJobDetails]![timeIn]>=[Forms]![frmPendingJobs]![cboDate] Or [tblJobDetails]![timeIn]>=[Forms]![frmPendingJobs]![cboDate] Is Null) And ([tblJobDetails]![timeIn]<=[Forms]![frmPendingJobs]![cboDate2] Or [tblJobDetails]![timeIn]<=[Forms]![frmPendingJobs]![cboDate2] Is Null)
How can I incorporate 8:00am to 8:00am into my cboDate and cboDate2. What can i do to make this happen? Your kindness will be greatly appreciated http://www.naijaryders.com/forums/images/smilies/thankyou.gif

View 10 Replies View Related

Query Of A Date/Time Field With Other Criteria

May 13, 2005

I'm trying to setup a query to pull only the records that have the latest date in Time Scanned for each different serial number.

I have a table with 4 fields: Serial Number, Model Number, Location and Time Scanned. Some records will have the same Serial Number repeated with different Model numbers,locations and times scanned.

I can't figure out how to query only the Last Time Scanned for each different Serial Number. I've tried using "Last" for critria on the time scanned field, but I need that for each different serial number.

It's probably easy...but I'm not able to get it. Thanks!

View 2 Replies View Related

Queries :: Date / Time Field - Query Criteria To X Quarter Of Y Year

Jul 24, 2014

I have a form (frmMetrics) with 2 Combo Boxes: "Year" and "Quarter" These are just number fields (which might be my problem?)

I have a date/time field in a query, and I want the criteria to be based off the year and quarter selected in frmMetrics.

View 2 Replies View Related

Employee Time Card System

Nov 15, 2006

I need to develope a system that will allow for employees to login and imput their "time card". I found one post on here about something similar, but it didn't give much info. I am very very new to Access so please give info in simple terms or very well explained. I am hoping that I can have a login and password so employees can't access eachothers time card. All it will need to track is
Date
Type of work
Hours
Rate
Comments
I am hoping that this is going to be an easy task, but I need some help. Anyone have any ideas or directions... or even better know where I could just download a template.
Thanks,
Chrissy

View 1 Replies View Related

Date & Time Criteria

Dec 27, 2005

Hi Guys,

Does anyone know how to write the criteria which includes both the date and time. for example, I want it to be the system's date and my specified date. e.g. (date() 14:00:00)

What will be the correct syntax?

Thx!!!:D

View 2 Replies View Related

Date And Time Criteria

Dec 28, 2006

I'm trying to build a query for a customer that will automatically run without making them enter a date and time.
Between [Enter Start Date] And [Enter End Date]
Is there a way to make a query auto run a date and time with out entering a date and time?

Thank you

View 6 Replies View Related

Date/Time Criteria- Simple, Right???

Sep 13, 2006

OK... what am I forgetting?

I have a linked SQL table with a Date/Time field called DATE. ALL I WANT TO DO is pluck all the records with a single date from that table.

Predictibly, the date field has values like this:
9/11/2006 12:40:46 PM

If in the MS-Access query I use criteria of #9/11/2006# I get other dates also. I have tried variations on Date() or DatePart but those either fail or don't work. Sheesh.

ULTIMATELY, I want to restrict records to a specific date, and then a certain hour of that date, so if you can include this bit of additional logic in your response, that'd be great too. Note: I am trying to structure a query, not write code.

Thanks!

View 2 Replies View Related

Date And Time Problem With Criteria

Jan 9, 2008

Hello, I am having a little trouble trying to get a criteria to work with a query in a database that someone else has passed to me.

In an InputTable there is in a field called DateIn with properties of date and time (general date). I want to be able to create a report that will allow the user to just chose to run the query for one day. Eg. Run the query using a dateinput of 2/01/2008. It just returns all of the records and ignores the criteria. I do not normally have this problem and was wondering where I should be looking.

SELECT InputTable.OrderNo, InputTable.[Customer Name], InputTable.Postcode, InputTable.ReturnsRef, InputTable.Description, InputTable.Unwanted, InputTable.POReturn, InputTable.Faullty, InputTable.Damaged, InputTable.Mispicked, InputTable.Replacement, InputTable.ItemRefund, InputTable.PostageRefund, InputTable.QReason, InputTable.QResolution, InputTable.DateIn, InputTable.Type
FROM InputTable WHERE (((InputTable.DateIn)=#1/2/2008#)
Many thanks in anticipation.

View 10 Replies View Related

Criteria For Empty Fields (date/time)

Aug 10, 2005

I am creating a query with criteria for a dates column. The column cotaining dates in my Table has many empty fields. I want to limit the criteria for my dates to >#1/1/2004#, but I don't want Access to exclude all the empty fields because I want all the data displayed for the purposes of my report.

What do I do? I'm not terribly familiar with Access, so please explain as completely as possible. Thanks in advance!

View 3 Replies View Related

Date/time Period Criteria Confusion

Jan 30, 2008

Hi there

I have created a database in Access XP (2002). In a nutshell, the database records numbers of people attending a seminar; which can take place any number of times per week, and so hence can take place any number of times per month.

I have set up the query so that it can run immediately after a seminar to show the attendants who attended the seminar on that current date "Date()" in the criteria box. However, how would I go about setting it up so that it shows who attended every seminar in the current week or month?

View 1 Replies View Related

Validation Text For An Expiry Date On A Credit Card

Nov 20, 2005

Basically, i have a field where the expiry date of a credit card is input, but i want to set an input mask so that it loks something like this:

MM/YY but i cant find a way of doing this!

I then have validation text which makes sure that this value is either equal to or more than todays date! this looks like this:

>=int(now())

So the input mask has to accept this validation...

If you could help, i would be very greatful!

Cheers

View 1 Replies View Related

Queries :: Date / Time Query - Return All Records Of Specified Date Or Date Range

Aug 19, 2015

I have a table that has entries recorded with date and time in one field, and I want to have a query that returns all records of a specified date or date range, regardless of the time in the field.

I have tried

Code:
Between [StartDate:] And [EndDate:]

And

Code:
Between [StartDate:] & "00:00" And [EndDate:] & "23:59"

Neither of which work ....

View 13 Replies View Related

Query Criteria Inclues Time

Feb 16, 2007

I am running a query linked to a mainframe database. The Entered Date field is formatted like this: 2/14/2007 1:14:00 AM. I want to run my query to show all data greater than an entered date at 5AM. So I tried using this for a query criteria >[ENTER START DATE]+#5:00:00 AM# , but Access says the query criteria is typed incorrectly or is too complex. Below are variations of the criteria I tried to use but none would work.

>[ENTER START DATE]+(#5:00:00 AM#)
>([ENTER START DATE])+(#5:00:00 AM#)

This criteria does work >(Date()-1)+#5:00:00 AM# , but I really want the user to be prompted to enter a start date because on Monday the report has to go back 3 days, if there's a holiday it has to go back 2 days, etc. The reports always have to begin at 5am of the starting date.

Any suggestions?

Thanks,
Jim

View 4 Replies View Related

Queries :: Date Field With Time - Query For Date Only And Get All Records

Apr 26, 2013

I have a query based on a table which has a date field. the field both in the table and the query have the time also in the date value so when I try to query on a date I get nothing if I copy the date and time from the field I will get the result for that record if I just use the date I get nothing. I have tried the format which does display just date but if you click on the field the time is also there You must be able to query for a date only and get all the records.

View 11 Replies View Related

Queries :: Getting Date / Time Range - Date And Time Are Separate Fields

Mar 13, 2014

I have a database with date and time each stored in a separate field. Now I want to query the database based on a start date/time and an end date/time. I started with the code below but it only returns events within the same time range on each day when what I really need is every event from a specified date and time through a specified date and time.

SELECT myTable.ID AS myTable_ID, myDate, myTime, FirstName, LastName
FROM Staff INNER JOIN myTable ON
Staff.ID = myTable.StaffID
WHERE myTable.myDate >= #3/2/2014#
AND myTable.myDate <= #3/3/2014#
AND myTable.myTime >= #8:00PM#
AND myTable.myTime <= #11:00PM#
ORDER BY myDate desc

In the above example what I want is every event from 3/2/2014 8:00PM until 3/3/2014 11:00PM. But what I get instead is every event between 8:00PM and 11:00PM on 3/2/2014 and every event between 8:00PM and 11:00PM on 3/3/2014.

View 4 Replies View Related

Queries :: Calculate Time Difference And Show Result Under Certain Criteria In Query

Jul 9, 2013

ID Up Time Down Time
John 18:00 15:00
Kelvin 08:00 08:05
Melisa 23:00 02:00

This is the Table , i need the Query result show IF [Up Time]-[Down Time] is >=3 hrs

Like Below :

ID Up Time Down Time
John 18:00 15:00
Melisa 23:00 02:00

IDUp TimeDown TimeJohn18:0015:00Melisa23:0002:00

I tried DateDiff("h",[Up Time],[Down Time]) in Field but POP out with error "Syntax error (comma) in query expression 'Table1.[DateDiff("h",[Up Time],[Down Time])]' " ...

View 9 Replies View Related

Query Date Criteria

Oct 3, 2005

Hi,
I have a date field in a query and was wondering if anyone knows how i can
have a prompt to choose between two dates.

Thanks
Alex

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved