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 gkittelson 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. nicmar

    Is there code to get parts of a table and put them into another table?

    Hello, I am trying to write the code to copy part of a table if certain requirements are made. I want to copy part of a table and put it into another table, but I can not figure out the code. I do not want to manually do it. Does this make any since?? What I am working on is a very in-depth...
  2. nicmar

    averaging multiple fields from a table

    How do you average multiple fields in SQL? To average one field, this is the syntax: SELECT AVG(Field1) FROM Table1; So how do you average multiple fields together? Ex. (this is incorrect) SELECT AVG(Field1, Field2, Field3) FROM Table1; What is the syntax??? Any comments or suggestions are...
  3. nicmar

    Assigning a value to a text box on a report...

    Hello, Is this the correct way to assign a value to an textbox on a report? Reports![Test Score Report]!txtMaxScore = rsStatistics![MaxOfScore] I am getting this error: "You can not assign a value to this object." The text box is an unbound text box on my report, I am...
  4. nicmar

    SQL syntax error

    Hey, Thanks, I did forget the single quotes, but I still get this error: Too few parameters.Expected 1. I have another question, maybe you can help me with, when I debug.print the Dim rsStatistics As Recordset tells me rsStatistics = nothing. As well as this line: Set rsStatistics =...
  5. nicmar

    Recordset trouble...

    Hey, Thanks, I tried that and I get this error: Too few parameters.Expected 1. I have another question, maybe you can help me with, when I debug.print the Dim rsStatistics As Recordset tells me rsStatistics = nothing. As well as this line: Set rsStatistics = gdbAll.OpenRecordset(gstrSQL...
  6. nicmar

    Recordset trouble...

    I am getting one of two error over and over. They are: Type Mismatch Or Syntax Error (missing operator) in 'SDataQ.Class=01CBE'. The Set rsStatistics = gdbAll.OpenRecordset(gstrSQL, dbOpenSnapshot) line is what I think is causing it. Like I said I tested my SQL and it is working, this is the...
  7. nicmar

    Recordset trouble...

    Hi, I am trying to get this recordset to work. My SQL statement is correct, I checked it in the query builder grid and it worked. Is there something that I need to turn on or declare, that is not done, to get the recordset to work? Or is there something to turn on for the dbOpenSnapshot? I...
  8. nicmar

    SQL syntax error

    Hi, I let the machine do the work! My SQL statement is correct. The problem I am having is with the Recordset line. Is there something that has to be turned on or declared somewhere to run a recordset, or dbOpenSnapshot? Does it matter if the database is ADO or DAO? Thank you, nicmar
  9. nicmar

    SQL syntax error

    Hey, I am trying to do an openrecordset, I am pretty sure that my SQL statement is correct. The problem I am having is with the Set rsStatistics line. I get one of two errors: Syntax error (missing operator) in query expression 'SDataQ.Class=01CBE'. OR Type Mismatch. No matter what I do...
  10. nicmar

    Select statement error

    Thnk You Paul. I knew it was something little but I stared at it too long!! Thanks again, nicmar
  11. nicmar

    Select statement error

    I am trying to get the average, minimum, and maximum from a table and display the asnwers in text boxes on my report. Here is my code: gstrSQL = "SELECT Avg(SData.Test1) AS AvgScore, Min (SData.Test1) AS MinScore, Max(SData.Test1) AS MaxScore" gstrSQL = gstrSQL & "FROM...

Part and Inventory Search

Back
Top