Search results

  1. stopher

    Export from Access to formatted Excel worksheet

    Of hand I don't know. I'm not very familiar with sub totals in Excel let alone the object model for them. Suggest you start a new thread if you haven't already.
  2. stopher

    Export from Access to formatted Excel worksheet

    For a new topic or problem I would generally recommend starting a new thread. I suspect new threads will get more people looking and helping for threads with no replies.
  3. stopher

    Export from Access to formatted Excel worksheet

    Take a look here.
  4. stopher

    Export from Access to formatted Excel worksheet

    Take a look at the saveas line. It is saving as an xls file currently. You can add a parameter to save as the file format consistent with your formatting https://msdn.microsoft.com/en-us/library/office/ff841185.aspx
  5. stopher

    Run Event Code Of Another Form

    Sorry, I quote the whole lot but Kens bit got dropped. Oh well :o
  6. stopher

    Run Event Code Of Another Form

    Interesting. I'm guessing that the business market needs a distinction as many businesses simply do not want Access rolled out to the masses. But instead roll it out selectively (if at all). For home use I guess their is no real reason not to included it. May for extra revenue but I'm...
  7. stopher

    Run Event Code Of Another Form

    I got 365 home and it was included when I purchased (on Windows). Also see here: https://products.office.com/en-gb/office-365-home
  8. stopher

    Export from Access to formatted Excel worksheet

    Yes, just add more lines for each field you want. I was too lazy to do them all but just wanted to give you the principle. Well done for figuring it out. Just shout if you need more info.
  9. stopher

    Run Event Code Of Another Form

    Not sure if I understand exactly what you are trying to do but maybe a couple of things might help: - you can reference a parent form in subform code with me.parent. So a subform does not need to know the name of the parent for to reference it - you can pass a form (or subform) as an argument...
  10. stopher

    Export from Access to formatted Excel worksheet

    Here's some code. Make sure you reference the Excel object library. Also note the file locations and file names in this code and change accordingly. Put the template in the location. Public Sub createXLorder(ListReference As String) Dim xlApp As New Excel.Application Dim xlWrkBk As...
  11. stopher

    Document Range Method - Word Object Model

    Try this: Function ParentandChildintoSeparateWordDocs() 'Make sure the name of the recordset is unambigous 'Good practice to reference the actual library Dim rs As DAO.Recordset Dim db As DAO.Database Dim rschild As DAO.Recordset Dim wrdApp As Word.Application Dim wrdDoc As Word.Document...
  12. stopher

    Document Range Method - Word Object Model

    .range in your code is referring to everything in your doc i think: (wrdDoc.range) So each time you loop you are applying wdStyleHeading1 to everything then applying wdStyleHeading2 to the last bit. I think you should apply you formatting to the current selection as you go or maybe use...
  13. stopher

    Crosstab Query - Headers

    You would need to create a new field that creates a string to look like your header i.e if the value is say 15 then the text string value in your new field should be "0:29" etc
  14. stopher

    Crosstab Query - Headers

    Your example suggests you were entering your headings as text i.e. enclosed with quotes. To enter as values, just omit the quotes. SO if you want headings for values 1, 2 and five then simply enter the following in the column headings property: 1,2,5
  15. stopher

    Crosstab Query - Headers

    You either need to enter your headings as values e.g. 29. Or convert your data values to text.
  16. stopher

    Crosstab Query - Headers

    Yes you can do that. Check out the relevant section here.
  17. stopher

    TempVars

    The late ChrisO would always don't take things you read for granted. Test them and prove them yourself. The following code will error with runtime error 9 (I have assigned myGbl as public elsewhere): Dim a(1) As Integer myGbl = 30 MsgBox "value of global before error = " & myGbl...
  18. stopher

    changing label text when using different button on form

    The code that opens the form (docmd.openform) includes an argument option called OpenArgs. This is just a string that gets passed to the form and you can refer to this value in the form. So pass an value for OpenArg (depending on what you want the title to be. Then in the On Load event of the...
  19. stopher

    How to use an unbound combo box to fill fields of a subform

    I think you need to explain more about what you want to do. What are the values in the combo? What fields do you want to fill in in your sub form and with what? i.e. where does the data come from that you are putting in the fields. But in principle you can create an after update event on the...
  20. stopher

    Sequential Date Field

    That's the way I'd go. It is simple and takes seconds to set up. Ten years of dates is only a few thousand records so don't worry about space.
Back
Top Bottom