Search results

  1. W

    "Or" in a update query criteria

    Sue, You can use the QueryDef Object: You're essentially just "bolting on" the Where clause for THAT particular form. Dim qdf as DAO.QueryDef set qdf = dbs.QueryDefs("YourUniversalQuery") qdf.sql = Mid(1, Instr(1, qdf.sql, "Where ") - 1) & " Where [TBL 1].ID Like [Forms]![YourForm]![ID]"...
  2. W

    Available prices

    Mihail, You'll need a couple of queries. This is still WAY faster than using the Domain functions. Assume you have the date on some form: Query1: Select ID_Product, PriceDate From tblProductsPrices Where PriceDate < Forms!SomeForm!TheDate Query2: Select ID_Product, Max(PriceDate) As...
  3. W

    Find/Replace code - line wrap problem

    Les, I think this is achievable. This link seems to show the tools available, even though its for Excel VBA: http://www.cpearson.com/excel/vbe.aspx This part might pertain to you "Adding A Procedure To A Module". hth, Wayne
  4. W

    how do i fix type mismatch error with Dcount function?

    martin, The middle argument for the DCount function is the name of the Query or Table to be searched. I don't think a recordset is fair game. Wayne
  5. W

    Odd Slowdown between Prod & Test versions

    Doc, I think its checking your bound forms, combo boxes, etc. Get your form in Design View and see if you can rename one of the tables in the BE. I think they're being referenced. Wayne
  6. W

    Odd Slowdown between Prod & Test versions

    Hi Doc, I don't think you're trying to update the BE during the save. I do think that the FE is checking BE tables that are referenced by your form. That is probably the SLOW activity you're seeing. Happy Holidays, Wayne
  7. W

    Percentage in a query

    S, ([Copy Of QueryLevel1Sum]![TotalStatus]/100) * 100 will give you the correct answer. Change to * 1000 to give you requested answer. You can also encapsulate the whole thing in the format function to give you a consistent answer. Wayne
  8. W

    Conditional Counts for Queries?

    Kozbot, Query1: Select LotNumber, Count(*) From YourTable Group By LotNumber Having Count(*) > 1 Query2: Select a.BlendNumber, a.LotNumber From YourTable As a Left Join Query1 As b on a.LotNumber = b.LotNumber Where b.LotNumber Is Null Order By a.BlendNumber, a.LotNumber...
  9. W

    DoCmd.PrintOut problem

    radek, The problem is probably that the query that feeds your reports has inner joins. Get the query in design view. Right-click on the lines joining tables and change the join-type to 2. Test it with the query. Then run your report. hth, Wayne
  10. W

    Question Export Database Sql Server 2008 to Access

    AlejandroGG , The conversion between Access/SQL Server is not perfect in either direction. The SQL Server Bit datatype is brought over as an integer. You'll have to change it if desired. The SQL Server User-Defined Functions will be of little use in Access. You'll have to convert these from...
  11. W

    convert sql query to be used in access

    Mike, Good to see you're still around here ... You can start by using a series of queries: SELECT a.case_id FROM NOLDBA_INT_CASE_STATUS a, NOLDBA_RPT_CASE_CHG_IND b WHERE b.case_id = a.case_id AND b.sys_curr_date = (SELECT MAX (c.sys_curr_date) ' FROM...
  12. W

    Multiple Variables For Insert INTO SQL Statement

    l, The delimiter for the date columns is the # symbol. Were one of those fields a date?? If so, change the single-quote to the #. Wayne
  13. W

    Multiple Variables For Insert INTO SQL Statement

    l, strSQL = "INSERT INTO [Sales Evaluations] (Salesman, Content_Areas) VALUES ('" & strSalesman & "','" & strContentArea & "')" hth, Wayne
  14. W

    Replace([fieldX]....

    b, The data does need to be separated AND put into a child table. This is a little rough, but ... Make a new child table: id AutoNumber fk ??? <-- Foreign key to your table (The PK of your current table) TheDate DateTime > Action Text > Your 3 fields Person Text > Fill it by: Select...
  15. W

    All Encompasing View

    M, Make two queries. qryMaxes: Select BarcodeID, Max(AssignedDate) From tblEquipment Group By BarcodeID Then use that query to get the specifics for that date: Select A.BarcodeID, A.AssignedDate, B.Employee, b.WorkSite, b.EquipmentDesc From qryMaxes As A Inner Join...
  16. W

    Davg not working in query

    Mike, Group: davg("[Cost]", "YourQueryName", "[Cost Basis Group] = '1HF208'") Wayne
  17. W

    Help! Multiple combo box IF THEN to filter on NULL

    CT, I'm not sure if the filter wants the Access "IsNull(PR)" or the SQL "PR Is Null". Try: If Nz(Me.PR_Filter, "") > "" Then 'Puchase Request If Len(strFilter) = 0 Then strFilter = strFilter & " And " If Me.PR_Filter = "<Blanks>" Then strFilter = strFilter & "IsNull(PR)" Else...
  18. W

    WHERE statement (between) in a query

    Nate, Try: WHERE (OperationalRiskEventTable.DateReported >= Forms!UpdateForm!UDateBegin Or Forms!UpdateForm!UDateBegin Is Null) And (OperationalRiskEventTable.DateReported <= Forms!UpdateForm!UDateEnd Or Forms!UpdateForm!UDateEnd Is Null) Wayne
  19. W

    struggling with update query based on inner join in SQL 2008

    Joe, update Table1 set Table1.UniqueID = Table2.UniqueID from Table1, Table2 Where Table1.LNAME = Table2.LNAME And Table1.FNAME = Table2.FNAME And Table1.DOB = Table2.DOB Wayne
  20. W

    show only one record per unique identifier?

    Patchy, Try: SELECT [Employee #], ConcatRelated("[Courses]", "[Courses tbl]", "[Employee #] =" & [Employee #]), ConcatRelated("[Start Date]", "[Courses tbl]", "[Employee #] =" & [Employee #]), ConcatRelated("[Completion Date]", "[Courses tbl]", "[Employee #]...
Back
Top Bottom