Recent content by markzaal

  1. M

    VBA to export query to Excel and open Excel without saving

    It gives me a syntax error for the very first "Format" already...
  2. M

    VBA to export query to Excel and open Excel without saving

    It now does open Excel but it remains empty eventhough the query does work and shows me the correct info...
  3. M

    VBA to export query to Excel and open Excel without saving

    Haha. Thanks for that very clear picture Paul! SELECT DivingActivitiesAir1T.ProjectNumber, DivingActivitiesAir1T.DPRDate, DivingActivitiesAir1T.DPRNumber, DivingActivitiesAir1T.DiveNr, Format([From],"Short Time") AS [Start time], Format([To],"Short Time") AS [End time]...
  4. M

    VBA to export query to Excel and open Excel without saving

    Trevor, I still get the too few parameters error... Paul, I have nio experience with SQL and am not really sure what to fill in on the parts you have highlighted in blue... I have a table "DivingActivitiesAir1T" with one of the fields "ProjectNumber". I use this as a Where criteria in the query...
  5. M

    VBA to export query to Excel and open Excel without saving

    Hi Paul, Thanks for your reply. I am afraid my VBA skills are not up to the task of dynamically creating the QueryDef... You are right that I have the user select a projectnumber on the form I use to export the data, which is used as an imput parameter in the query. Mark
  6. M

    VBA to export query to Excel and open Excel without saving

    Hi Trevor, I am afraid the DB is over 2MB zipped... I use the code like this (it also shows what I used before) Private Sub Command75_Click() 'Dim filename As String 'filename = Me.disk & ":\Airdive 1 Activities-" & Me.ProjectNumber & ".xls" 'DoCmd.TransferSpreadsheet acExport...
  7. M

    VBA to export query to Excel and open Excel without saving

    Hi Trevor, First of all thanks for the help! I do get an error however... On the "Set MyRecordset = MyQueryDef.OpenRecordset" I get the error: 3061; Too few parameters. Expected 1. Any thoughts? Thanks again! Mark
  8. M

    VBA to export query to Excel and open Excel without saving

    Access 2010 Hi All, I am trying to export certain info from a query into Excel and have Excel open after export using VBA. Right now I use the "DoCmd.TransferSpreadsheet" command which lets me export the query and save it to an Excel file with a certain filename I have chosen. This works...
  9. M

    Grouping and sorting in report does not what do what I want!!

    I want the last To to be the next From time. So the first 2 hours of the day there may be 5 different cleaning activities, each with the consecutive time period and following each other. Then there may be one welding activity, then 2 cutting activities (which should also group, but show the time...
  10. M

    Grouping and sorting in report does not what do what I want!!

    Yes. When I group by TypeofWork, it does just that. But then the "from" and "to" times are no longer chronological. When I sort on "From", it only sorts within the groups. Still it doesn't make it chronological over an entire day...
  11. M

    Grouping and sorting in report does not what do what I want!!

    I am talking about the design view of the report... It says "From" not Form... The report I am trying to make shows the activities of a diver between "From" and "To" as a period of time...
  12. M

    Grouping and sorting in report does not what do what I want!!

    A From can only have 1 TypeofWork and 1 Activity. The next From (which will be the same as the last "To" in order to fill 24hrs in a day) can have the same TypeofWork but will have a different activity. It can also have a different TypeofWork. If do a grouping on TypeofWork the records on the...
  13. M

    Grouping and sorting in report does not what do what I want!!

    access 2010 Hi, I have a table with the following fields: - From - To - TypeOfWork (to be chosen from a combo-box) - Activity (text field to be filled in freely) In a table i have a complete day with times (from -> to), the type of work between those times and the activity performed between...
  14. M

    "New Record" not possible after filter of form

    It was that simple! Thank you so much! Just for future reference; what is the difference?
  15. M

    "New Record" not possible after filter of form

    Access 2010 Hi all, I use the following code to open a splitform filtered by projectnumber and create a new record: DoCmd.OpenForm "ROVActivities3F", acNormal, "", "[ProjectNumber]=Forms!NewForms!LastProjectNumber", acFormEdit DoCmd.RunCommand acCmdRecordsGoToNew This all works fine when I...
Top Bottom