Search results

  1. A

    Select Statement

    Is there a way to assign a field a value temporarily in a query? My problem seems to be that if you are calculating a percentage of say 15,000 which in this case are total sales. That number is the total of two categories; East and West. The East and West totals are aggregates of months...
  2. A

    Find duplicates

    You and me both....
  3. A

    Find duplicates

    Thanks but sorry no. Same result. You think the Abs val is hiding the minus sign?
  4. A

    Find duplicates

    Here is what I changed it to: SELECT ApTest.[GrossAmt], ApTest.[VenNum] FROM ApTest WHERE (((ApTest.[GrossAmt]) In (SELECT [GrossAmt] FROM [ApTest] GROUP BY Abs ([GrossAmt]), [GrossAmt] HAVING Count(*)>1 ))) ORDER BY Abs ([GrossAmt]), ApTest.[GrossAmt]; Runs and finds dups but no "-" sign...
  5. A

    Find duplicates

    Would you alter my query to show me what is correct? Its the only way I will get it. Thanks
  6. A

    Find duplicates

    Confused, its already being grouped by Abs ([GroupBy])? Are you saying put it somewhere else?
  7. A

    Find duplicates

    That threw the followinf error: "You tried to execute a query that does not include the specified expression "GrossAmt" as part of an aggragate. Here is what ran: SELECT ApTest.[GrossAmt], ApTest.[VenNum] FROM ApTest WHERE (((ApTest.[GrossAmt]) In (SELECT [GrossAmt] FROM [ApTest] GROUP BY Abs...
  8. A

    Include negative amounts in query

    Using this query: SELECT ApTest.GrossAmt, ApTest.PaidAmt, ApTest.DistAcct, Abs([GrossAmt]) AS Expr1 FROM ApTest WHERE (((ApTest.GrossAmt) In (SELECT [GrossAmt] FROM [ApTest] As Tmp GROUP BY [GrossAmt] HAVING Count(*)>1 ))) ORDER BY ApTest.GrossAmt; I can successfully find all the positive...
  9. A

    Find duplicates

    I got this far but it says I have an extra ( near my Abs part of the query. Microsoft and Google help not that much help. Can anyone see the syntax error? SELECT ApTest.InvNum, ApTest.PoNum, ApVenTest.VenNum, ApVenTest.VenName, ApTest.GrossAmt, Abs([GrossAmt]) AS Expr1 FROM ApVenTest INNER...
  10. A

    Find duplicates

    I should clarify my error I get, says I am trying to execute a query that does not include the specified expression 'GrossAmt' as part of an aggregate function.
  11. A

    Find duplicates

    Changed it to this: SELECT ApTest.[GrossAmt], ApTest.[VenNum] FROM ApTest WHERE (((ApTest.[GrossAmt]) In (SELECT [GrossAmt] FROM [ApTest] As Tmp GROUP BY Abs ([GrossAmt]) HAVING Count(*)>1 ))) ORDER BY ApTest.[GrossAmt]; Now it throws an error saying it cant find GrossAmt
  12. A

    Find duplicates

    I've got this query. SELECT ApTest.[GrossAmt], ApTest.[VenNum] FROM ApTest WHERE (((ApTest.[GrossAmt]) In (SELECT [GrossAmt] FROM [ApTest] As Tmp GROUP BY [GrossAmt] HAVING Count(*)>1 ))) ORDER BY ApTest.[GrossAmt]; Which works fine but I I want to include negative amounts as being a...
  13. A

    Convert a text file to a tabbed delimited file

    Im saying import a text file, scrub it deleting the extra spaces, and convert it to a tabbed file using VBA.
  14. A

    Query By Form

    Here is the BE
  15. A

    Query By Form

    I have an unusual problem. I have a form called frmSample. On the form are several combo boxes which the user can select different criteria and then the query collects the entries, selects the records and loads them into the form called frmProject. There are lots of problems getting it to...
  16. A

    Filter Help Needed

    This report is opened by two other buttons on the form. One for a department selection and another time for an employee selection. Now I want to open it again for a date range filter. Here is my latest code and the FE and BE of the DB. Private Sub cmdFilterByDate_Click() Dim strDoc As String...
  17. A

    Filter Help Needed

    OK Just to be clear, the first bit of code I posted at the top is what does not work in the current form I am trying to build. The second bit of code I posted is from a totally different form which works fine. So what do I need to use from code set #2 in the first bit of code I posted in order...
  18. A

    Filter Help Needed

    Ok, Here is some more information I neglected to post. The code I am trying to use I use in another routine which is pasted below which works fine: Private Sub cmdApplyFilter_Click() Dim strFilter As String Dim blnFilterOn As Boolean Dim strCriteria As String strCriteria...
  19. A

    Filter Help Needed

    I am trying to filter a report by a date range using the code below. I know the filter string is supposed to be something like: ([StartDate] >= #strfilter#) AND ([EndDate] <= #strfilter#) I just cant get it. I have a text box for the StartDate and one for the EndDate. Can someone show me...
  20. A

    Function asks for parameter

    Thanks. A couple of questions: Do you have to have all the code in the same sub or function for this to work. Also, cant get the code which I copied from your example and changed the names to clear the selections in my list boxes. Is there a setting in the properties you have to set?
Back
Top Bottom