Search results

  1. T

    Excel macro runs fine when run through excel but error appears when run from access module

    Hi Isaac, Thanks very much for your feedback and apologies for the late reply. I'll certainly look into this. At face value, getting rid of select/activate etc. seems quite daunting but I bow down to superior knowledge on the subject and I'll have a gander. Thanks again.
  2. T

    Excel macro runs fine when run through excel but error appears when run from access module

    I might be being dumb here... it's now saying it can't find that macro as it thinks the file name is part of the macro name.
  3. T

    Excel macro runs fine when run through excel but error appears when run from access module

    That's what's strange! It's quite an extensive excel macro with a number of tasks being run and goes without a problem. It even opens and closes other excel files without a problem later in the code. It is purely when I try to close a specific file (that will already be open at the time of...
  4. T

    Excel macro runs fine when run through excel but error appears when run from access module

    The below is the code in my access module. It opens the excel file containing the macro perfectly fine. Dim XL As Object Set XL = CreateObject("Excel.Application") With XL .Visible = False .displayalerts = False .Workbooks.Open path...
  5. T

    Excel macro runs fine when run through excel but error appears when run from access module

    Hi All, I have a module run from access that does a few things then opens an excel file and runs a macro on that excel spreadsheet. Running the excel macro from both excel and access worked perfectly fine. I realised that one of the excel files that will be opened as part of the excel macro may...
  6. T

    How to allow edits to a query

    Hi Both, Thank you for your replies and I apologise for the delay in getting back to you. I have found a solution by the user being able to switch between an "edit" mode and "search" mode on a form. So at the click of a button they can record straight to the table or view info. I would like to...
  7. T

    How to allow edits to a query

    Hi all, I have a query that gets info from 3 tables. (See attached) However using the links that I have used and require It does not allow edits or additions. I understand why it is not letting me do this but I am asking for the best work around. I would only need to make edits and not...
  8. T

    Dlookup in Excel Files... Or something similar.

    That's a good idea! Why didn't I think of that... Thank you!
  9. T

    Dlookup in Excel Files... Or something similar.

    Hi, I am hoping there is a way to lookup a value in multiple excel files from Access VBA. There are multiple excel files in location "F:\EVERYONE\Toby" that all start with "SP2240-170" and end with a date range. This date range will be generated by the Excel file automatically based on data...
  10. T

    Datasheet view vs Form view

    Hi RanMan, Thanks for you reply. I'm wanting the parentform to be in datasheet view for general use. I'm was saying that in form view it seemed to work. The subform is linked to the parentform on SN field. Many thanks.
  11. T

    Datasheet view vs Form view

    Hi All, I have a form with fields [RER] and [SN]. The record source is Table_1. There is also a subform that has fields [RER] and [SN]. The record source is Query_1. Query_1 is a Select Query from Table_1. subform is linked to parentform on the SN field. I have a macro On Current event of...
  12. T

    Using wildcards in the middle of a file location

    Hi Minty, I love this! Looks very useful for the future. Unfortunately I can't get it to work for just folder names. It seems to want to limit it to files as you have to define the file type ".xls" or ".doc" for example. I've had a play around with it but with no success. I'll keep trying as it...
  13. T

    Using wildcards in the middle of a file location

    Sorry for the late reply! Not been able to get back to this until now. I have tried this: excelloc = Dir("F:\CELAB\EVERYONE\Toby\DSL Database\SP" & lassy & "*", vbDirectory) excellocs = "F:\CELAB\EVERYONE\Toby\DSL Database\" & excelloc & "\DWGSET\" & ljob & ".xls" But it still isn't taking...
  14. T

    Using wildcards in the middle of a file location

    After fiddling around with it it seems as though it isn't picking up anything before the SP2270 and is defaulting to this new local location. I set up a textbox that shows the path just for fault finding purposes and it's only returning "SP2270" onwards...
  15. T

    Using wildcards in the middle of a file location

    Thanks for your reply. I have tried your method however it doesn't appear to take the wildcard into account. It has "SP2270\DWGSET". And what is even stranger is that it's not giving back the location in the F:\ drive but instead giving back my documents folder in the local C:\ drive... I 100%...
  16. T

    Using wildcards in the middle of a file location

    Hi Minty, This was a thought of mine but the number of files are in the hundreds so would be quite time consuming. I know sometimes such tasks have to be done when creating a database but I'm always looking for the quicker but just as effective solution. And god forbid I ever have to do...
  17. T

    Using wildcards in the middle of a file location

    Hi theDBguy, The user isn't actually defining the file name they are defining an assembly number and job number. But we are able to find the location of these files using this information. We will use the values they defined for another section of code. The information they define will lead to...
  18. T

    Using wildcards in the middle of a file location

    Hi All, I am trying to open a workbook that will be in a location that is dependent on what the user defines via input boxes: Dim assy As String Dim job As String assy = InputBox("Please enter assembly number in the format Dxxxx-xxx", "Assembly Number") ' i.e. D2270-502 job =...
  19. T

    Issues with toggle buttons on form

    Never mind... The button was opening it in read only. Toggle buttons were applying filters to subform so didn't let me... DOH!
Top Bottom