Search results

  1. C

    VBA rename table column (almost there)

    No code in the sheets.. access now pointing to the correct sheet and all working fine. :) Ok its now 22:00 here in the UK and have been playing with this since I finished work at 18:00.. I think its time to give my eyes a break. :p Well from Access anyway. Time for some html/php now! :D...
  2. C

    VBA rename table column (almost there)

    Hmm, Until I added the compatibility part above save it was stopping at the save point :confused: I am using access 2010. Would this cause any issues!? I will try again without and see if it runs. :) Just need to point to a set sheet now.. Would assume that is easy enough :) Edit:- Now...
  3. C

    VBA rename table column (almost there)

    Lol, Yes I soon realized that and amended (see above post!) :o I think I'm almost there.. :) Just need to point to correct sheet on final workbook and should be good to go! :D One other thing.. While making the sample sheet I saved as xlsx. But the sheet sent to us is a xls. Is there a...
  4. C

    VBA rename table column (almost there)

    Ok done it! :) Now have (as you said above!) :o Function RenameColumn(strWorkbookNameAndPath As String) Dim objXL As Object Dim xlWB As Object Set objXL = CreateObject("Excel.Application") Set xlWB = objXL.Workbooks.Open(strWorkbookNameAndPath) xlWB.ActiveSheet.Range("A1").Select Do...
  5. C

    VBA rename table column (almost there)

    Ok, Just changed to -1 but now getting the same error as before. so I now have in Module2 Function RenameColumn(strWorkbookNameAndPath As String) Dim objXL As Object Dim xlWB As Object Set objXL = CreateObject("Excel.Application") Set xlWB = objXL.Workbooks.Open(strWorkbookNameAndPath)...
  6. C

    VBA rename table column (almost there)

    I now have it updating the spreadsheet output is current date but it is updating the total column not the column before. Would you still like the above code?
  7. C

    VBA rename table column (almost there)

    Module is currently just named module2 until working and it stops on line objXL.ActiveCell.Offset(0, 1).Select Cheers Tom
  8. C

    VBA rename table column (almost there)

    Thanks, Just trying now.. Added code to a new module and then in my form added RenameColumn "Path to sheet" but I receive this error 1004 - Application-Defined or Object-Defined Error Any ideas?
  9. C

    VBA rename table column (almost there)

    Yeah all data is coming from a spreadsheet first. I would ask someone to rename before import but would like to avoid any manual intervention. The sample sheet with the data headers can be found here. coatezy.co.uk/sample.xlsx Thanks! Tom
  10. C

    VBA rename table column (almost there)

    As above Bob, ghudson's method would work if it was the last column but unfortunately there are other columns that follow and a new one is also added each month. Thanks for your help so far guys! :)
  11. C

    VBA rename table column (almost there)

    Thats the another problem.. My total field isnt on the end. There are 4 other columns after the total column that are added each month! :mad: So I think my only option is to look for "total" and -1. :( Cheers Tom
  12. C

    VBA rename table column (almost there)

    It really is a case of I have to do it like this... unfortunately another large company is supplying some very messy data and this is the only way I can get around this.. This database is not being used to hold any long term data... purely to import some data run a few queries and pump them out...
  13. C

    VBA rename table column (almost there)

    Hi I have a bit of a strange one.. Have to query a column in a table that is imported from an excel spreadsheet in to access. problem is a new column is added each week so the column name changes.. (I know really bad, but its what I have to work with from a 3rd party) The one thing that never...
  14. C

    Hopefully a quickie? :)

    I am trying to do a simple if statement (well probably simple for you guys) but im having a few difficulties. I want to check after update field If its after 16:30 and today’s date has been entered then display a msg box.. If before 16:30 and today’s date then no action and the same...
  15. C

    Sending email using access data

    Job done! Worked it out.. :cool: Cheers
  16. C

    Sending email using access data

    Hi guys, How would a go about creating a email using the data in from the current opened record. I am currently using vba code to create a pdf and send it via an email.. But I would like to place the required data directly in to the mails body.. Using me.'s. Your help would be really...
  17. C

    Rerquired fields check with VBA

    So lets say I want to check field Me.JobNo what would I need to enter in the code above!? I tried what I though It should be but not working :( Thanks for your help! :cool:
  18. C

    Making custom data check for field

    Hi, I'm also trying to do the exact same thing at the moment.. And as said above I'm not sure on the code required to check a specific field to check it has data in the field. I understand the before and after update side of things.. Cheers
  19. C

    Rerquired fields check with VBA

    Required fields check with VBA Hi guys, I am building a database at the moment that requires some required fields... Problem is the form needs to be refreshed before the form is completely filled in which makes access prompt the user that all required fields have not been filled in.. Instead...
  20. C

    Lookups Help!!?

    Hi I have hit a dead end. I am currently putting together a report that tracks all of our payments. I am having a few problems though.. I have my main table which includes cust's name, trans no, trans date, product, sku, and cost. I also have another table with field’s product, sku and cost...
Back
Top Bottom