Search results

  1. L

    using an if statement on an sql string

    almost there Hey thanks guys I'm spoilt for choice! Actually I cant try it out for a few hours but I'm wetting my pants with exitement. I'll go with the SQL tweak rather than the query. Watch this space! Cheers Luigi
  2. L

    using an if statement on an sql string

    Hi Wayne I tried that however my Iif formula didnt produce the desired result. Can you be more specific? Cheers Luigi
  3. L

    using an if statement on an sql string

    I'm populating an access report from an sql string thus: (edited version below) SQL = "SELECT asset.Local_ID, asset.Category, asset.Asset_Label, asset.Asset_Loc, " _ & "asset.Task_Price, asset.Invoice_Price" Me.RecordSource = SQL No problems, everything is working fine...
  4. L

    convert a month to a number

    Thanks but maybe I didnt explain myself clearly enuf. I want to match up by integer on both sides of a "where" clause thus: WHERE (((DatePart('m',[tblSales]![SaleDate]))=[Forms]![frmSalesByMonth].[cmbMonth])); At present the right hand side is returning a string - "January" etc from the combo...
  5. L

    convert a month to a number

    Hi I've got a combo box that displays the months of the year. I want to return a number from the selected month eg January returns 1, February returns 2 and so on.. Cheers Luigi
  6. L

    Using a combo box to filter dates in a query

    Hi I have a field in a query that must select all sale dates within a particular month. This month is passed from a combo box (cmbMonth) on a form (frmSalesByMonth). I want to put the code on the criteria line. I've got this far Is Not Null And [Forms]![frmSalesByMonth]![cmbMonth]????? Any...
  7. L

    SQL date range dilemma

    I'm importing a date from a form and putting it into SQL as a string variable but its not finding any records. Here's the important stuff Dim SQL, str1, str2, strDate As String str1 = Forms![TestForm].[Start_Date] str2 = Forms![TestForm].[End_Date] strDate = "Between #" & str1 & "# And #"...
Back
Top Bottom