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 Mike Lewis 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. davyre

    avoid error 2220

    sweet. Thanks!
  2. davyre

    avoid error 2220

    Hi, I have a piece of code to display a picture in an Access Form. Here's the code: http://tek-tips.com/threadminder.cfm?pid=701 Dim UnitID As String UnitID= Me.UnitID.Value If IsNull(UnitID) = False Then Me.ImageBox.Picture = "E:\User\USER\Database\Unit Pics\" & UnitID & ".png" Else...
  3. davyre

    INSERT INTO query not doing its job

    update 2 : Okay, now I understand why. The 149 of 174 records that are not appended to the table are duplicates to the existing records. But the duplicates are only on PartNumber field (not the PK). The reason I entering these duplicates because I have different price and vendorID (thus these...
  4. davyre

    INSERT INTO query not doing its job

    update: I tried to delete all the tblparts, tblpartstock, and tblpartorder. Now it seems working (it got 174 records on tblparts). Probably there are something that prevents access to insert the record freely.
  5. davyre

    INSERT INTO query not doing its job

    yes, I run the insQry but it seems did not insert all records.. what do you mean by constraints? It has relationship with tblPartStock and tblPartOrder but that's it.. I have checked the datatypes for each field and it should be okay. Otherwise there will be no records being inserted.
  6. davyre

    INSERT INTO query not doing its job

    Hi, I have an append query to insert some data into a table from ms excel. Heres the code: Dim partNum As String Dim desc As String Dim Material As String Dim cost As Long Dim vendorPartNum As String Dim VendorID As Long Dim ctr As Long Dim xlLine As Integer Dim allBlank As Integer Dim...
  7. davyre

    help with HAVING clause in a query

    it worked like a charm! Thanks PH!
  8. davyre

    help with HAVING clause in a query

    Hi Duane, I was just using Query Wizard to get my SQL there, so I do not intend to use HAVING instead of WHERE from the beginning. Anyway, the problem about my SQL there (and yours too), is that if you say OrderID<>494 AND UnitID<>5, it will filter any order with OrderID 494 and any order with...
  9. davyre

    help with HAVING clause in a query

    Hi, I have a query to show all orders and its units that is still "Pending". Here is the query: SELECT TblCustOrderUnit.OrderID, TblCustomer.CustomerName, TblCustOrder.PONumber, TblCustOrder.JobName, TblCustOrder.CustomerUDD, TblUnits.UnitName, Count(TblCustOrderUnit.UnitID) AS Qty...
  10. davyre

    Help with logic/algorithm for Excel Data table

    ah great! Not familiar with PivotTable but it solves my prob! THanks!
  11. davyre

    Help with logic/algorithm for Excel Data table

    Hi, In Access I have query to display top 5 units sold each year. I put those in a recordset, and I want it to be placed in the excel file that I wanted. The problem is the structure of a recordset is different with data table in Excel that I need. It is being used as data source for Bar Graph...
  12. davyre

    total sales each year query help

    All good. Thanks PH!
  13. davyre

    total sales each year query help

    I can't. It gave me error You tried to execute a query that does not include the specified expression " as part of an aggregate function.
  14. davyre

    total sales each year query help

    Great PHV! But there are two problems here when I tried your code, First, if there are two records with the same Number, it returns both (so the query result will be like TOP 6 instead of just 5). How can you select either one (doesnt matter for my case)? Second, what is ORDER BY 1 mean? What...
  15. davyre

    total sales each year query help

    Another question: I have this query, but how do I get the top 5 for each year? If I put TOP 5 after SELECT, it will only select top 5 for the whole query. Can I get the top 5 units for each year? Thanks! SELECT COUNT(TblCustOrderUnit.UnitID) AS [Number], TblUnits.UnitName...
  16. davyre

    total sales each year query help

    Ah, thanks Skip. This is the code that I use (with slight modification, using COUNT instead of SUM) SELECT YEAR(TblOrder.OrderDate) AS [Year], COUNT([TblOrder.OrderID]) as [Tot Sales] FROM [TblOrder] GROUP BY YEAR(TblOrder.OrderDate) ;
  17. davyre

    total sales each year query help

    Hi, I have a table Sales, I want to have a query to display total sales in each year.. The table is like this: |OrderID|OrderDate|CustomerID|Comment| |1 |1/1/2011 |12 | | |2 |5/1/2011 |13 | | ... |600 |1/12/2013|5 | | How can I get...
  18. davyre

    using docmd.findrecord for name index list

    Hi, I have an index list in my form (A-Z) for quick search on CustomerName field, think of it as quick scroll on iPhone Contacts but this one you have to click on each alphabet instead of swiping the screen. So this listbox has A-Z and what I want is if user click on letter C, it goes to record...
  19. davyre

    Database become error when sending email

    Hi, usually the form/textbox acts fine..but whenever I clicked the button to send the email, the datepicker went wrong. I can remedy this by closing the MS Access and re-open it, but it is not convenient. And if I click the button again, it goes wrong again. I have tried to compact/repair...
  20. davyre

    Database become error when sending email

    Hi, I have a button which sends email. The problem is whenever I clicked the button, and it finishes, then the database become error in terms of a textbox in every form which has Date Picker, it stopped working. I cannot fill the textbox using the date picker anymore (either a click on a...

Part and Inventory Search

Back
Top