Recent content by EMP

  1. E

    Two queries

    You can run the two queries from a command button on a form. DoCmd.OpenQuery "Query A" DoCmd.OpenQuery "Query B" ^
  2. E

    Creating a query based on dates, but not consecutive dates

    I don't think you can achieve this with a query or queries. You'll need to use VBA code to loop through the records in a recordset. ^
  3. E

    Random records

    To address the second part of your question - You'll have to build the query SQL statement on the fly. The number in the Top predicate doesn't accept a parameter value. ^
  4. E

    Query dates month from current date

    Suggestion: In Access, change article date to Date/Time data type in table structure - this way you don't need any date conversion functions. Test your SQL statements in Access to see which SQL statement works. Hope this helps. ^
  5. E

    Even / Odd ID Query?

    In Access, [ID] mod 2 = 0 returns all even id numbers and [ID] mod 2 <> 0 returns all odd numbers. Not sure about FrontPage though. ^
  6. E

    Can you use a wildcard in a "Between" parameter

    In query Design View, you can put >=1 And <6 in the criteria for the Numbers field. In query SQL View, the Where Clause is WHERE [Numbers]>=1 And [Numbers]<6 Edited: For a parameters query, your can use >=[First] and <[Last] ^
  7. E

    reduce the number of records

    Select distinct City from [yourTableName] ^
  8. E

    Expression help....

    Most members here do not like to do coursework exercises for students. You are likely to get some responses to your requests if you can show us that you have already made an effort to solve the problems yourself. ^
  9. E

    Access 2007 Update Query With Blank Fields

    Need more info. Please copy and paste the SQL statement of your update query here. ^
  10. E

    Date range

    lk2827- Read Jon K's solution on the other thread (the link in post #13 above.) - Maybe the kids' study text hasn't covered the topic of PARAMETERS Declaration ! ^
  11. E

    Count number of work days for each month between a range of Dates

    Yes, it's extraneous. It's also confusing to the human mind. I can easily see what's happening when I see some expressions like Date2 - Date1. It will return the number of days between two dates. But I had a hard time making out what was really happening in an expression Date1 + Date2. ^
  12. E

    Delete with inner join

    Try this:- DELETE DISTINCTROW RESULTTABEL.* FROM RESULTTABEL INNER JOIN DELETETABEL ON RESULTTABEL.Hks=DELETETABEL.Hks AND RESULTTABEL.Ks=DELETETABEL.Ks; See this thread:- http://www.access-programmers.co.uk/forums/showthread.php?t=126346 ^
  13. E

    ~~ US / UK dates ~~

    Here two text boxes on the form are used for parameter input. No # delimiter is used. ^
  14. E

    ~~ US / UK dates ~~

    Another possibility. It sounds like Access is treating the dates as text strings. What's the data type of the field in the table? Text or Date/Time? ^
  15. E

    iif statement help

    You can set up the criteria in a new column in the query grid like the following:- --------------------------- Field: IIf([Forms]![SalesData]![StartDatetxt] Is Null, True, [SalesDate] Between [Forms]![SalesData]![StartDatetxt] And [Forms]![SalesData]![EndDatetxt]) Show: uncheck Criteria: True...
Top Bottom