If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"If - Then" Return These Records
I have a query based off of two tables. There are date fields in each of the
tables (class date and enroll date). The query includes each of the date fields. I tried to do a criteria that would only display those records where the enroll date was greater than the class date. I couldn't get anything to return even though some dates in the enroll date fields were greater than those in the class dates. Is there something I need to do because they are time/date fields? Could I build an expression in another field in the query that said "IF enroll date class date THEN display the text "need to enroll"? |
#2
|
|||
|
|||
"If - Then" Return These Records
BM wrote:
I have a query based off of two tables. There are date fields in each of the tables (class date and enroll date). The query includes each of the date fields. I tried to do a criteria that would only display those records where the enroll date was greater than the class date. I couldn't get anything to return even though some dates in the enroll date fields were greater than those in the class dates. Is there something I need to do because they are time/date fields? Could I build an expression in another field in the query that said "IF enroll date class date THEN display the text "need to enroll"? Post your query. A basic greater than or less than should work fine here... SELECT * FROM TableName WHERE [class date] [enroll date] These ARE actual DateTime fields right? Not text fields containing strings that look like dates? -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
Thread Tools | |
Display Modes | |
|
|