Recent content by Runawaygeek

  1. R

    Getting input box to feed query before function call

    Thanks, I read that too, but it seemed to be working ok. Just in case though, i have added the Format() Thanks, Ben
  2. R

    Getting input box to feed query before function call

    Fixed it, it was missing #`s for dates.. "WHERE AA.[Date of Activity] Between #" & MyDate1 & "# And #" & MyDate2 & "# " & _
  3. R

    Getting input box to feed query before function call

    PS. I set a debug to check the dates where going in, they are.. Debug.Print stsql CurrentDb.OpenRecordset stsql
  4. R

    Getting input box to feed query before function call

    Thanks for this, its looking much better than where i was going. I see your point about running the SQL statement like that, however, its not picking up any results. I know the names of tables are right and the join as i copied it from the built query design SQL view. When i run the query I...
  5. R

    Getting input box to feed query before function call

    Hello, So in my last post I got the answer to calling a function that will export a record set to Excel. but the issue with that, is my where has a WHERE clause that requires the user to input a Date Range. I am trying to get the VBA to get the data from the user then open the query and...
  6. R

    Open Excel temp from a Query

    Thanks, i used this, it works great. His page is full of handy tips. All i need to resolve now is how to save the user input before i call the function. When the query opens it asks the user to inputs Dates (Between [Start Date:] AND [End Date]) as part of the where clause. But the code...
  7. R

    Open Excel temp from a Query

    Hi all, Bit of an odd one, but can you Export a Query to Excel as a temp file. By that i mean, not writing an Excel file to a save location, but more Opening excel, putting the data in and then the user has to save the document? The reason being, I dont know or have access to any of the...
  8. R

    Cant seem to get DoCmd.ApplyFilter to work

    Not to worry, I tried another approach and it worked. Private Sub Command10_Click() DoCmd.SetWarnings False Dim Path As String Dim Af As String Dim AL As String Dim DT As String Dim SQLDelete As String SQLDelete = "Delete * from ImpAndDevTbl" DoCmd.RunSQL SQLDelete DoCmd.OpenQuery...
  9. R

    Cant seem to get DoCmd.ApplyFilter to work

    Also, which acSpreadsheetTypeExcel12 should i be using? It gives me errors, but if i use .xlsx as the extention, Excel wont open it? Office16 Thanks
  10. R

    Cant seem to get DoCmd.ApplyFilter to work

    Hi all, This is my code: Private Sub Command10_Click() Dim Path As String Dim Af As String Dim AL As String Dim DT As String Path = "C:\" Af = Affiliatebx 'A box on the form that give the client name XL = ".xls" DT = Format(Now, "DDMMYYYY") DoCmd.Close 'this is here as the Readonly...
  11. R

    Referencing Column names

    Hi Steve, Just wanted to thank you for all your help, talking through it and your ideas have really helped me. I have tested 5 tasks for weighting now and they all work and I already have a Sum score buy affiliate. I just need to write in the 30 left over rules and its done! Thanks again. B
  12. R

    Referencing Column names

    I assumed thats what you meant by: I think its a winner anyhow, it means i can keep the current Table and form for tasks, have a table that lists the Tasks and their weighting. the link is automated, which makes the output dynamic. I just need to map them to my other data now. ill keep you...
  13. R

    Referencing Column names

    I think i get what you mean by one giant table, add the weights to Tasks, TASKA, TASKB, TASKC, WEIGHTA, WEIGHTB, WEIGHTC Then i could build anything, like IIF(ISNULL(TASKA),"",TASKA*WEIGHTA) This might be the winner, also if i crosstab it, i could then have the Weight Table made easy for...
  14. R

    Referencing Column names

    So you example is where i am at, on your tblClientTasks table, Task one needs to be a number, Task two needs to be Text Task three needs to be YES/No I have considered having task types (TEXT, NUMBER, YN) as column headings, then working it out from that, but i think it will get messy...
  15. R

    Referencing Column names

    actually the rules get even more complex, and involved some major SQL work on some of the other data in the database. But I have all that done. Its the linking to the value thats the issue. I dont want to write out a rule for each task, as if the complexity of the task changes due to...
Back
Top Bottom