Search results

  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...
  16. M

    Cut off left-hand side of text in textbox and show only right-hand side

    Access 2010 Hi all, I have a report with some text boxes on it. Sometimes the text in these boxes can be a very long string of chracters (maybe a path to some folder). In this case I do not want the text box to grow. I just want the report to show me the right-hand side of this path and cut...
  17. M

    sql SELECT statement returns PK, I want second column...

    Hi John, I know that is what it should normally look like. The reason I made it like I did, was because there can only be 1 list per day. My way, I can use the date as PK and keep all names together in 1 record. Is there no workaround to my problem above using SQL? Another thing is that I want...
  18. M

    sql SELECT statement returns PK, I want second column...

    access 2010 Hi all, I have a table (POBListT) with 3 fields: ID (PK, autonumber), FullName, Position I have a form (POBDiveF) bound to another table (POBDiveT, 1 date field (DPRDate), 10 name fields (DiverName1-DiverName10) that selects people from this first table with a combo box. It shows...
  19. M

    Data from multiple fields in same record in combo box dropdown

    Access 2010 Hi all, I have a form bound to a table which has 20 (name)fields and 1 date per record. A user fills in this form first to indicate which people are present this day. I know it would be better to use 1 name per record but that would in this case not work since the form must show...
  20. M

    Changing the column order in the datasheet portion of a split form (Access 2010)

    This worked for me: Basically it's an access 2010 bug: One way around the bug: If you open the list, move the columns into the correct order, right click a column heading and click unhide fields, then click close and save the form it should keep the order. Just the normal way of moving columns...
Top Bottom