Search results

  1. J

    Question Import from Excel

    You might succeed using an UPDATE query. Import the updated pricelist into a separate Access table so that you now have two Access tables. Now this is only going to work if there is some kind of product ID# in each table whereby a given row from one table matches up with a row of the other...
  2. J

    Combobox that simulates TreeView question

    Nice suggestion. Hadn't occurred to me to use cascading cbos.
  3. J

    Combobox that simulates TreeView question

    You have a hierarichical table called Categories. You've already created a TreeView to display it, because you are well aware that it is difficult for other controls (such as a combobox) to display hierarchical data. Yet you are now asking for precisely such, that is, you now want to display...
  4. J

    How to use the Double datatype.

    Ahh....That helps me in two ways. First it seems to confirm that the problem I mentioned is real (I was wondering, as I don't see this topic raised very often, if maybe it was all a brain fart on my part). Second it gives me a practical solution. Thanks !!!
  5. J

    How to use the Double datatype.

    I have a table with a column called Frequency (numeric). The user wants to do a simple search, for example, WHERE Frequency BETWEEN 500 AND 600 The table is very large (4 million records) and I have to do some joins. I found out, the hard way, that the search runs 10 times faster if the...
  6. J

    Query to show only last entry

    Those nice screen shots don't help me much because I don't know how to use the GUI. I can write a little SQL, though. Maybe I can get you started (I'm not going to bother name all the columns, though) SELECT W.ProjectName, W.EnteredBy, W.EntryDate, W.WeeklyStatus, P.ProjectManager FROM...
  7. J

    Query formula for "one year later"

    SELECT P.MachineName, dtmStartOfMaint , dtmStartOfOutage, dtmStartOfOutage - dtmStartOfMaint as NumDays FROM PlannedMaintenance as P INNER JOIN Forced as F ON P.MachineName = F.MachineName WHERE dtmStartOfOutage - dtmStartOfMaint < 365 or if you want to select all the columns SELECT *...
  8. J

    delete 4 out of 5 records where name field and address field repeat more than 5x

    Later I was thinking you might need to add the word ID to the first line: INSERT INTO KeepThese (ID)
  9. J

    delete 4 out of 5 records where name field and address field repeat more than 5x

    Create a temp table call KeepThese with column ID as primary key (assuming these values are unique in the original table). These are the ID numbers you wish to keep. You MUST designate ID as the primary key in KeepThese (otherwise the DELETE query won't work). The following is untested...
  10. J

    delete 4 out of 5 records where name field and address field repeat more than 5x

    Ok, that's a strange request. You'll need something more sophisticated than what I gave you.
  11. J

    delete 4 out of 5 records where name field and address field repeat more than 5x

    Yes, I was supposed to omit the HAVING clause (otherwise it deletes the singular rows as well as those with dups). But I don't know why you are getting that error -it works find for me. Maybe your table is bound to a form such that the form has a lock on the table? To find out, try running...
  12. J

    delete 4 out of 5 records where name field and address field repeat more than 5x

    Actually I'm glad you got an error because I think I was supposed to omit the Having clause. I'll try it on my own and report back.
  13. J

    delete 4 out of 5 records where name field and address field repeat more than 5x

    A standard query for deleting dups is this: Delete from table1 where ID NOT IN ( select min(id) from table1 Group by Name, Address HAVING Count(*) > 1 ) Assuming it's the Name, Address combo that constitutes a dup. There is a faster way if you have, say, over 10,000 records in the table, but...
  14. J

    Crosstab/Pivot

    I'm not sure that your request fits into a crosstab/pivot schema. Possibly what you want is concatenation. And I doubt that Access (unless you use VBA) is very handy with concatenation (even with Sql Server, concatenation is not a simply query). Pivoting means to take a column of values (a...
  15. J

    Performance problem. Caused by compacting?

    Well, I hate to say this, but it turns out I didn't get consistent results over the long haul. On many, many days, the database turned out to be slow depite the daily routine of dropping the indexes, compacting, and then restoring the indexes. Today I found another solution which I expect to...
  16. J

    Why won't this Function Work?

    Okay, I understand you are just testing but have you also tried the test function WITHOUT the immediate window? Some compilers have more bugs in the immediate window than in the main window. Call the test function from a regular sub - it won't solve this thread but might allow you to make some...
  17. J

    SQL Query Problem

    In other words you would do something like this: INSERT INTO tbl_course_attendees_new ( URN, current, session_ID ) VALUES (Forms!frm_search!URN , -1 , Forms!frm_search!SessionID)
  18. J

    SQL Query Problem

    SELECT session_ID FROM sessions WHERE course_ID = Forms!frm_search!CourseName Can you put another textbox on the form called SessionID whose source is set to the above? (Make it invisible if you want). Then you could add the sessionID value directly into your query.
  19. J

    Why won't this Function Work?

    Oh, sorry, didn't realize you were trying to run it in the Immediate Window
  20. J

    Why won't this Function Work?

    I got the impression a while back that VBA can be a little sensitive to the physical order in which your blocks of code are arranged. For example I seem to recall having a problem doing this: Private function calculate() as Double End function Private Type Customer LastName as string End...
Back
Top Bottom