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 Wanet Telecoms Ltd 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. sna1maa14

    find the avg for the last 3 values for each record using a query?

    Sorry I have not been able to log in because of the San Diego Wildfires. dhookom, your code was exaclty what I need. Thanks! SELECT tblScores.* FROM tblScores WHERE (((tblScores.Date) In (SELECT TOP 3 Date FROM tblScores s WHERE s.PlayerID = tblScores.PlayerID ORDER BY Date DESC)));
  2. sna1maa14

    find the avg for the last 3 values for each record using a query?

    Here is my situation. I have to assign an avg to each player based of their last three games played. I have a table with scores for each game by person and the month played. I need to take their last 3 scores and avg them for each player. So my question is how do I get player 3 to only avg his...
  3. sna1maa14

    MkDir runtime Error 76. Path Not Found

    I was afraid you were going to say that. Thanks.
  4. sna1maa14

    MkDir runtime Error 76. Path Not Found

    I'm trying to create a new folder if it does not exsit but I keep getting a runtime Error 76, Path Not Found. It only happens if I specify multiple folders ex. Mkdir "D:\Folder1\Folder2". If I put Mkdir "D:\Folder1" it works. What am I doing wrong. Thanks Sna1maa
  5. sna1maa14

    How do I convert Year and Week to date?

    Skip it worked great for me! You get a Star. I did have to correct a few things to get it to work but I got the genral idea. Here is what I did for anyone elese trying the same thing. Dim dval as string Dim yr Dim wk Dim cent Dim mydate As Date dval = "0508" If CInt(Left(dval, 2)) < 30 Then...
  6. sna1maa14

    Multi Select List box to fill array and then run sql from that array

    Thanks Aceman that works perfect. I just tried it out and it does exacly what i need to. Why is it that the smallest of code is sometimes the hardest to figure out. Well at least for newbies like me.
  7. sna1maa14

    Multi Select List box to fill array and then run sql from that array

    Thanks aceman i will give it a try. i'm using the sql to create a table with the customers info for the report. Basicaly create a table then output ot excel. Unforunatley I'm out of work now for a week , I spraied my ankle. I will try it at home with a test db.
  8. sna1maa14

    Multi Select List box to fill array and then run sql from that array

    I have a Multi-select (simple) list box with customer account Names (unbound) and IDs (bound). I want to be able to select the customers I need and then print their reports. So what I need to do is get the list of customers, loop through their Id's, run a sql select based off the first name and...
  9. sna1maa14

    Error When trying to transfer records to excel.

    Thanks for your help guys. I ended up changing the queries so that i pass the parameter in the last query and i used a SQL select in the rst.open. Worked like a chram. I think I need a beer after a long day of staring at code. Sna1maa14
  10. sna1maa14

    Error When trying to transfer records to excel.

    Ok tried that and now it says No value given for required parameter??? Some reason it's passing the week when it runs. Sna1maa14
  11. sna1maa14

    Error When trying to transfer records to excel.

    I keep getting this error 2147217900 (80040e14) Invalid Sql statement; Expected Delete,Insert,Procedure,Select or Update when trying to transfer records to Excel workbook. Here’s my code run from a command button. Dim strMonth As String Dim rst As ADODB.Recordset Dim xlApp As Excel.Application...
  12. sna1maa14

    need help finding missing dates from group of records!!!

    Never mind. After talking to one of the IT guys it turns out there is another table I can use to get the results I need. Thanks for the help anyways. They are very protective of their info since I don't work for the company yet, Internship. It is like being a temporary Magicians assistant. He...
  13. sna1maa14

    need help finding missing dates from group of records!!!

    Ok let me explain it a little better. I only have records for when they have made a payment. So I would have 12 records for one year. Where as I only have 11. Now what is the best way to find the missing month for that year and say on the report that month so and so and year so and so are...
  14. sna1maa14

    need help finding missing dates from group of records!!!

    What I want to do is find out when a customer hasn't paid his bill for the month and say what month/months are unpaid. So say I have a customer with billing info for 3 years. I have customer Id, Name, Bill amount, amount paid and the month/year it was paid on. Now say customer 1 paid every month...
  15. sna1maa14

    Help with varaible in sql select statment

    PHV, Thanks that worked like a charm. I could have swore I tried that yesterday with the quotes but maybe I had one too may spaces or something. Who know after 8hrs of coding it all starts to look a like. By the way thank you for your helpful posts in the past. You and others have been a...
  16. sna1maa14

    Help with varaible in sql select statment

    I want to create a table that will use todays date in the format of "tblmmm_yy" as the table name here is what i have. Im sure this is an easy fix but i just can't seem to get it. Dim strTablename As String strTablename = Format(Date, "mmm_yy") DoCmd.SetWarnings False DoCmd.RunSQL "SELECT...
  17. sna1maa14

    Create ADO recordset problem

    In case someone out there was wondering the soultion to this error as I was. Here it is "SELECT * FROM tUsers WHERE tUsers.UserID=5") It should look like this "select yourfields From yourtable Where yourfield= '5'" There are some good examples of ADO at...
  18. sna1maa14

    Email all records = to a rec from other table and rpt 4 nxt rec

    Yes Table 1 hold the area list with the email address for each area.
  19. sna1maa14

    Email all records = to a rec from other table and rpt 4 nxt rec

    I have a command button rigth now on a form that I click. On Error GoTo Export_Err 'Transfers query to spreadsheet DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryContracts", "d:\data\matttest.xls" Export_Exit: Exit Sub Export_Err...

Part and Inventory Search

Back
Top