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

Search results for query: *

  1. Eugenios

    2007 to 2003 function problem

    yyyy/mm/dd SELECT * FROM qryContLife WHERE 1=1 AND [Depot In Date] Between #2008/05/01# And #2008/07/30# mm/dd/yyyy SELECT * FROM qryContLife WHERE 1=1 AND [Depot In Date] Between #05/01/2008# And #07/30/2008# Both textboxes are formatted to short date. Currently in both cases in...
  2. Eugenios

    2007 to 2003 function problem

    Didn't help, returns 2 weird values out of like a 100 possible. The thing is that even if I run the 2003 version in 2007 access it works fine, but if in 2003 it doesn't work.
  3. Eugenios

    2007 to 2003 function problem

    ...to convert it to 2003. I have a line of code which returns a requested date range from a query to a listbox: Dim MySQL As String MySQL = "SELECT * FROM qryContLife WHERE 1=1" If IsDate(Me![StartDate]) And IsDate(Me![EndDate]) Then If CDate(Me![StartDate]) < CDate(Me![EndDate]) Then...
  4. Eugenios

    Multiple IIf statements

    thanks, going to work on this
  5. Eugenios

    Multiple IIf statements

    DepotFee: IIf(Not IsNull([Depot Out Date]), DatePart("d",[Depot In Date])*[Storage Fee/Day], IIf(DateDiff("d",[Depot In Date], Date())<31,DateDiff("d",[Depot Out Date],Date())*[Storage Fee/Day], 31*[Storage Fee/Day])) Solved i guess ;) thanks
  6. Eugenios

    Multiple IIf statements

    ...to calculate the storage fees of containers The logic behind the formula is - If [Depot Out] IsNotNull then datediff("d",[Depot In],[Depot Out])*[Storage Fee] ... now here's the trouble: the statement divides into 2 more ifs - if [Depot Out] IsNull and datediff("d",[Depot In],Date())<31 then...
  7. Eugenios

    DateDiff and some operations with it

    right guys, thanks for the great help, managed to do it with this function: DepotFee: IIf(DateDiff('d',[Depot In Date],Date())>31,31*[Storage Fee/Day],DateDiff('d',[Depot In Date],Date())*[Storage Fee/Day]) Have a little problem left. On my input form I have a combobox to input the...
  8. Eugenios

    DateDiff and some operations with it

    I'm trying to run this from an independant form. It is easy to run it in a query, but I need a a function in vba that will make calculations based on the datediff values ;( Am i getting this through ? ;(
  9. Eugenios

    DateDiff and some operations with it

    Hello everyone. I've recieved wonderful help last time when i turned to this forum, now i have another problem and hoping you will help a beginner again. I have a table with containers. Each container has an arrival date. I am trying to make a function using DateDiff to calculate the difference...
  10. Eugenios

    Search multiple fields simultaneously with data ranges

    Remou, thanks alot, everything works now, you've done a great job. You're a very patient and helpful person. Thank you.
  11. Eugenios

    Search multiple fields simultaneously with data ranges

    yay, we're on the right track, it works with simultaneous searches, this is the output: SELECT * FROM qryContLife WHERE 1=1 and [Status] Like 'RM*' AND [Depot In Date] Between #05/01/2008# And #01/05/2008# and it gets shown in the listbox, but the dates are weird. I input from 05/01/2008...
  12. Eugenios

    Search multiple fields simultaneously with data ranges

    ...said, left 1 if statement at the beggining of the Addwtf sub, haven't changed anything in the button sub, this is whats the output like: SELECT * FROM qryContLife WHERE 1=1 [Container Number] Like '*'[OwnerCode] Like '*'[Arrival Date] = '*'[Depot In Date] = '*'[Container Size] Like...
  13. Eugenios

    Search multiple fields simultaneously with data ranges

    Sorry, don't pay attention to the : Private Sub Command120_Click() I accidently copied that together with the required code
  14. Eugenios

    Search multiple fields simultaneously with data ranges

    ...As String, mycriteria As String, MyRecordSource As String Dim argcount As Integer Dim Tmp As Variant mycriteria = " " argcount = 0 MySQL = "SELECT * FROM qryContLife WHERE 1=1" Addwtf [myd1], "[Container Number]", mycriteria, argcount, "myd1" Addwtf [myd2], "[OwnerCode]", mycriteria...
  15. Eugenios

    Search multiple fields simultaneously with data ranges

    ...your suggestion is that the function takes all the fields no matter whether they r empty or not, the output in this case looks like this: SELECT * FROM qryContLife WHERE 1=1 and [Container Number] Like '*' and [OwnerCode] Like '*' and [Arrival Date] Equals '*' and [Depot In Date] Equals...
  16. Eugenios

    Search multiple fields simultaneously with data ranges

    SELECT * FROM qryContLife WHERE 1=1 AND [Depot In Date] Between #2008/05/01# And #2008/07/01# this is what i get if i just input the date range, and I get the values in the listbox, but as soon as I add something else to the search, Container Size or Status, the listbox is blank.
  17. Eugenios

    Search multiple fields simultaneously with data ranges

    ...As String, mycriteria As String, MyRecordSource As String Dim argcount As Integer Dim Tmp As Variant mycriteria = " " argcount = 0 MySQL = "SELECT * FROM qryContLife WHERE 1=1" Addwtf [myd1], "[Container Number]", mycriteria, argcount, "myd1" Addwtf [myd2], "[OwnerCode]", mycriteria...
  18. Eugenios

    Search multiple fields simultaneously with data ranges

    Right, what I experiece when I search for a date range and other values. When I search for a date range, the output is this : SELECT * FROM qryContLife WHERE 1=1 AND [Depot In Date] Between #05/01/2008# And #01/07/2008# AND [Depot In Date] Between #2008/01/05# And #2008/07/01# And the...

Part and Inventory Search

Back
Top