Search results

  1. S

    The select statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation in incorrect?

    Good Day to all and Thank you in Advance, I am stumped on why I am receiving the following error message. The select statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation in incorrect? My code is as follows: stSQL = "SELECT...
  2. S

    Count distinct records on a report

    Hello! I have created a report that contains employee records. An employee can show up twice on the report if they have regular and overtime. Example: Emp No Hours Type 100 40 Reg 100 2 OT 102 40 Reg At the bottom of the...
  3. S

    Dlookup In Query

    Wow! I was overthinking that. Thank you Minty! This works so much better... SELECT CheckStubInfo.PatronNo, CheckStubInfo.[BF%], CheckStubInfo.SCC, CheckStubInfo.Bacteria, CheckStubInfo.[Protein%], Round(IIf((350-([CheckStubInfo].[SCC]/1000))>0,(350-([CheckStubInfo].[SCC]/1000))*[Pricing...
  4. S

    Dlookup In Query

    I'm trying to execute this query to return a value from another table(GradeAQualityAdjustment). SELECT CheckStubInfo.PatronNo, CheckStubInfo.[BF%], CheckStubInfo.SCC, CheckStubInfo.Bacteria, CheckStubInfo.[Protein%]...
  5. S

    I'm trying to execute this query to return a value from another table(GradeAQualityAdjustment)...

    I'm trying to execute this query to return a value from another table(GradeAQualityAdjustment). SELECT CheckStubInfo.PatronNo, CheckStubInfo.[BF%], CheckStubInfo.SCC, CheckStubInfo.Bacteria, CheckStubInfo.[Protein%]...
  6. S

    ROUND Function in Query

    Right! What a headache....took me 3 days to figure it out. I thought I was going crazy.
  7. S

    ROUND Function in Query

    Just an update: I have been working with a database that was already created and I'm doing modifications to it. I have been trying over and over to use the Round function with no luck. What I found was that there was a function called "Round" in the General Procedures module. That module...
  8. S

    ROUND Function in Query

    I have tried both of these solution on all 3 fields that I am rounding and still receiving the same error message.
  9. S

    ROUND Function in Query

    Hello, I am receiving the error from my Query below: "Wrong number of arguments used with function in query expression 'Sum(Round([BFPercent]*[Weight]),2) AS BFPounds'. If I remove the ,2 from it the query executes just fine. I thought the ROUND function allows for that additional parameter to...
  10. S

    Query to poplulate 3rd field on the fly based on 2 others.

    Good Afternoon, I have a query that is outputting 2 fields, but I'm wanting to populate the 3rd [Expr1] based on the [PatronNo] and [Main]. If [PatronNo] is empty I was to display [Main] in [Expr1] or if [PatronNo] is equal to [Main] I want to display [Main] in [Expr1], otherwise display...
  11. S

    Help returning query row fields as columns

    Thank you all for your help. I was able to back up these queries and use a union query closer to the tables. I'm new at this! I appreciate all the knowledge.
  12. S

    Help returning query row fields as columns

    There are queries built on queries for multiple types of calculations, the union query worked but I don't want information if it is 0 or null. SELECT qryMainPatronWithSubs.MainPatron, qryMainPatronWithSubs.MainWeight, qryMainPatronWithSubs.SplitPatron1...
  13. S

    Help returning query row fields as columns

    I suck at trying to explain what I'm doing! Sorry. Ok, so my query returns 4 different fields. PatronNo, PatronWeight, SubPatronNo, SubPatronWeight. PatronWeight and SubPatronWeight are calulated fields (two different types of calculations). Is it possible to somehow have PatronNo and...
  14. S

    Help returning query row fields as columns

    Below are the results of my query calculating a Main Patron weight and a Sub Patron Weight (two totally different calculations). What I'm trying to attempt is to show both the MainPatron field and the SplitPatron field in the same column named "Patron". I would also like to do the same with...
  15. S

    Question on calulation in a query

    Thank you pbaldy! Makes complete sense now that I found the module holding that public function.
  16. S

    Question on calulation in a query

    Good Morning All, I'm trying to figure out how someone calculated a field in a query I am working with and I am confused. Here is the calculation: SCCAmt: Sum(IIf(SCCPremium([SCC],[Bacteria])>0,SCCPremium([SCC],[Bacteria])*[sumOfLbs]*0.01)) I'm especially not understanding this part...
  17. S

    Combining multiple fields to populate a combo box with different formats

    Thank you so very much! Much easier to accomplish what I want to do than what I was trying.
  18. S

    Combining multiple fields to populate a combo box with different formats

    Hello and thank you all in advance for your help. I'm currently adding two fields together in a query to populate a combo box that then in return passes those values to a report. My first field: empID My second field: empName empID consists of 1.0 1.1 21.0 100.10 empName consists of...
Back
Top Bottom