Recent content by walrus

  1. W

    SHELL command

    That worked, cheers! :)
  2. W

    SHELL command

    Hi I'm trying to use this command: Shell "C:\WINDOWS\explorer.exe """ & Me.txtSource & """, VbMaximizedFocus" to open a folder from within Access 2007 & Windows7. It works, but it always opens the folder minimised, whether I use VbMaximizedFocus or VbNormalFocus. It used to work properly in...
  3. W

    Sub or Function not defined

    *Sigh*... I wish. The 'source' database was developed for users who cant link tables, who have no idea what 'normalization' is and are too busy to learn how to do it properly - managers and the like. So if I develop some new report and I get to re-create tables locally I sort it out properly...
  4. W

    Sub or Function not defined

    This is how the data is stored in the source database tables! I know it's not a very efficient way of doing things but the original developers set the database up this way and this is what I have to work with. When I create local databases I usually do normalise the data. As it happens I solved...
  5. W

    Sub or Function not defined

    Hi All I've got a weird problem. When I try to compile the code below I get the error message 'Sub or Function not defined'. I'm using Access 2007. For x = 0 To 20 If Nz(rec1(x), "") <> Nz(rec2(x), "") Then DoCmd.SetWarnings False strSQL =...
  6. W

    What's your best/worst joke?

    Sister Joan was teaching Sunday School; she asked the children what they wanted to be when they grew up. Little Johnny stood up and said "A Fireman." "Very good." said the nun. Little Susan stood and said "a nurse." "Very nice." said the sister Joan. Little Bobby stood up and said "an...
  7. W

    What's your best/worst joke?

    I'll put a joke up when I've checked them all - I'd hate to be repetitive!
  8. W

    What's your best/worst joke?

    It's a quiet day in the office today - I'm currently 52 pages in and only an hour to go until home time...plus posting something means I'll get notified about new jokes! :cool:
  9. W

    Works then doesn't then does - repeat!

    I identified my little bell! I'd come across this issue before, and solved it... :o My code now reads... Private Sub cmdATNormal_Click() On Error GoTo ErrorTrap On Error Resume Next Dim strLocation1 As String, strLocation2 As String, strLocation As String Dim appExcel As Object Dim myWorkbook...
  10. W

    Works then doesn't then does - repeat!

    I tried adding the following at the start and end of my code: 'Terminate Excel if it is still open sKill = "TASKKILL /F /IM excel*.exe" Shell sKill, vbHide to kill any hidden instances of excel but it still does it - works once, fails once, etc. But I think you are on the right...
  11. W

    Works then doesn't then does - repeat!

    Hi I'm trying to run a bit of code in Access 2007 on Excel 2007. Its supposed to open 2 workbooks, change the names of the sheets, copy one sheet to the other workbook, save it with a new name then close. My problem is it works... once. Run it again and I get errors (Run time error 462 at the...
  12. W

    DoCmd.TransferSpreadsheet acExport - loses part of dataset

    Fixed it! It was the old access-only-reads-the-first-8-rows-of-the-query-before-setting-the-field-type-for-the-excel-sheet chestnut. I added a sort order to one of my query fields so the field type was recognised as alphanumeric (it was just picking up the numeric) and Bobs a man you auntie...
  13. W

    DoCmd.TransferSpreadsheet acExport - loses part of dataset

    Hello :banghead: I am exporting a query from access to excel (both 2003), then creating a pivot table in excel from access. This all works fine. I use the same query with different criteria to produce different reports, then output them to excel, create the pivot table, close excel, rinse...
  14. W

    Access VBA query error 3122

    debug.print got it - I'd made a mistake in my query design! The problem was in the 'GROUP BY' - I didn't add in tbPlantID.PlantID, so the base query worked without it, but when I added the criteria on plantID I got the error. Cheers for the direction!
  15. W

    Access VBA query error 3122

    Hello First post here! I am using MS Access 2003 VBA. I have a query that worked and did what I wanted... strSQL = "SELECT tblCombiSS.CustomerID, tblCombiSS.CustomerName, tblCombiSS.UAID, tblMaterials.MaterialIDDW, tblMaterials.Material, tblMaterials.P24BUABR...
Back
Top Bottom