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 Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format date and other criteria on Expr ? (Query)

Status
Not open for further replies.

pinstripe

Programmer
Dec 27, 2004
52
Hi all,
i have a query for a report as fallows:
(for start date and end date i need to have separate fields)

SELECT Prevoz.Destinacija,Prevoz.[Datum Odhoda], Prevoz.DatumPrihoda, Prevoz.[Dodatek Vozniku], Prevoz.Opombe, [date - from] AS Expr1, [date - to] AS Expr2
FROM Prevoz
WHERE ((([date - from])<=[Datum Odhoda]) AND (([date - to])>=[DatumPrihoda]))
ORDER BY Prevoz.[Datum Odhoda];

the problem is when msgbox pops up to enter date, i need to make some kind input mask (shoort date) and somekind of verification if it is a date - also i need to make possible if the user leave the box empty then it should take default date for current year from (01.01.2005) and also the same for ending date
I wouldn't wanna make another form for this (if it is possible not to)
I have tryed something with Format(Date, "dd/mm/yyyy") but with no luck.

thank you
Best,



 
I suggest to use a form to enter and verify data instead of Parameters/MsgBox.

--------------------------------------
>>>>>> Bugs will appear in one part of a working program when another 'unrelated' part is modified <<<<<
 
hi kermit01de ,

i had done it with form after all, i just wanted to know if it can be done also with Parameters/MsgBox.
Anyway, thanks for your response.
Best,


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top