Search results

  1. S

    Exporting to Excel - One listbox per sheet

    With the listbox data yes rather than data which is stored within a table - am I assuming correctly that the expression example below "TableName" refers to an actual table rather than a data source in my case a list box? .TransferSpreadsheet(TransferType, SpreadsheetType, TableName, Thanks...
  2. S

    Exporting to Excel - One listbox per sheet

    Thanks looking at the docmd.TransferSpreadsheet can I use it against a listbox as the only examples I can find seem to be table based? Thanks
  3. S

    Exporting to Excel - One listbox per sheet

    Hi, Im looking to export my listbox values to a single workbook BUT a new sheet is created per export. There are 6 listboxes in total and I already have the code to export a single listbox but if I try to use this code its going to overwrite the csv each time - I was wondering if anyone could...
  4. S

    Checking multiple subform for values before closing

    Hi Im looking to check 3 sub forms for values and if they contain any then delete them. After a bit of googling I discovered that you should use recordset.recordcount - to which I tried but I get method or data not found - is this a valid method? My code to which Im using is: If...
  5. S

    Type Mismatch on VBA SQL - I think its the date?

    Got it to work.... strSql = "SELECT TimesheetTable.ProjectRef, TimesheetTable.sUser, Sum(TimesheetTable.Hours) AS SumofHours, Month([task date]) AS Expr1, Year([task date]) AS [Year] " & vbCrLf & _ "FROM (UserNames_tbl INNER JOIN UserGroups_tbl ON UserNames_tbl.GroupID =...
  6. S

    Type Mismatch on VBA SQL - I think its the date?

    Again thanks I appreciate your help. The bits that are pink reference number values from the form (the number values make up the date which references a date value on the table ) the blue bit references the project reference stored within the table which is stored as text and the green bit...
  7. S

    Type Mismatch on VBA SQL - I think its the date?

    Thanks for that. Im still getting mismatch errors and am slightly bamboozled. Although fields within my table reference date for example 12 = December and 2013 reference the year, do I need to reference them within the SQL as dates with #'s? Also with your example WHERE someDateField = "...
  8. S

    Type Mismatch on VBA SQL - I think its the date?

    Thanks, I thought I could take the code as per the QBE - obviously not. Do I need to remove all the brackets that get added to the query or can they stay?
  9. S

    Type Mismatch on VBA SQL - I think its the date?

    Hi guys, yep me again... How do you show dates within SQL VBA? As Ive been struggling with the below code and cant for the life of me get it to work. Im sure its the date that's incorrect and Ive tried putting #'s in but still it errors with type mismatch. Could someone enlighten me please...
  10. S

    Output query results - which is the preferred method?

    Hi, Im trying to output my query results and am a little hesitant as to which method is the best. Would you output the results to a subform or a listbox? I mean there must be a reason as to which method is the preferred method and I cant seem to find out what it is? Thanks :banghead:
  11. S

    Having a combo box with different column values

    Hi, Am I correct in thinking the only way to have a combo box with different values in each column is to create a table and then bind the combo box to the column you are referring to if you want it to represent a value from another. For example if I have a combo box with the words January...
  12. S

    Merging\combining multiple results from the same field

    Thanks again - I didn't realise that you could just delete the grouped by if you didn't want to group, deleted it and jobs a gooden :)
  13. S

    Merging\combining multiple results from the same field

    Sorry to pester - am I missing a trick? Ive tried to apply this code to a different query (after the same result but from a different table) and I cant seem to get my results to sum for each particular month - any ideas please? SELECT ([F2]) AS Project, ([sUser]) AS Employee, Month([F4]) AS...
  14. S

    Merging\combining multiple results from the same field

    Thanks its working and not only that but Ive learnt something new with Access, I knew that you could create the additional expressions when creating queries but I was never 100% sure how it works - I am now :) Also I haven't got the month name showing but Im thinking I might not need it as I...
  15. S

    Merging\combining multiple results from the same field

    Thanks I did actually try that before posting the question. Do I add the monthname to the format([Task Date],"yyyymm") or is there a different way of going about it? As if I add it to a separate expression it prompts for some text. Thanks again :)
  16. S

    Merging\combining multiple results from the same field

    Legends nice one... I'm trying to convert the returned month which is showing as yyyymm to the month name - is this possible? So although Im setting the criteria of yyyyymm I wont tick that field to show it I thought I would create another expression which shows the month name. I tried Expres...
  17. S

    Merging\combining multiple results from the same field

    Thank you, I've just realised I forgot quite an important bit (hangs head in shame). The end product will be to select a month of a year. Is there a way to combine all records for that month. As an example you would end up with: UserA - TotalHours - Month - ProjectA UserA - TotalHours - Month...
  18. S

    Merging\combining multiple results from the same field

    Hi, Im trying to work out the best way to combine results from a table. Not knowing the correct terminology I didn't want to post in a specific section of the forum until its clear in my head. So I have a query currently which shows the entries into my database for example (these aren't the...
  19. S

    Creating VBA SQL query compared to the QBE

    Thanks you've explained it perfectly to me.
  20. S

    Creating VBA SQL query compared to the QBE

    Hi guys, Something that I have been taking for granted and only today realised - am I correct in thinking when you create a query using the QBE Access creates a temporary table to display the data and if I was to put the same sql code into VBA I would need to create some sort of field all be...
Back
Top Bottom