Search results

  1. aziz rasul

    Using the Replace function

    I have a field where I want to replace specific values to a different value as part of an Encryption process. I then want to Decrypt the data back to what it was. Hence if I have say the following data which forms a part number of a product yEr456 I want to Encrypt this so that I end up with...
  2. aziz rasul

    Iterating Access db's

    Something else to think about.:)
  3. aziz rasul

    Iterating Access db's

    I will look at this on Monday. I may have started on the wrong foot. Part of what I was doing was to 'grab' data using a recordset and also run some queries e.g. dbs.DoCmd.OpenQuery "Query1" Now that I know I can get what I want without opening the Access application, I hope it will make life...
  4. aziz rasul

    Iterating Access db's

    Thanks for all your help MajP. The code works when I use a user form so I am happy and content with that. Will look into how to get data without opening the Access database. I didn't know you could do that.
  5. aziz rasul

    Iterating Access db's

    Still didn't work I'm afraid.
  6. aziz rasul

    Iterating Access db's

    It doesn't work (using a test module) when I run the Opening file code and then stop the code and then run the Closing file code, separately. However it does work via 2 command buttons to open and close the file respectively on a user form. Why it should make a difference, I don't know.
  7. aziz rasul

    Iterating Access db's

    The fact that you get it to work, gives me hope. I'm obviously doing something wrong. I have a single module with the code like so:- Option Explicit Public MyDict As Dictionary Public Function OpenDatabase(strFilepath As String, strFilename As String) As Boolean Dim objAccessApp As...
  8. aziz rasul

    Iterating Access db's

    But if I run Public Sub TestScope() say from cmdbutton1 and then separately run Public Sub testscope2() from cmdbutton2 then it doesn't work. If I run both subs consecutively then the code runs OK.
  9. aziz rasul

    Iterating Access db's

    Mentioned in opening post. MajP's code did work according to what I wanted if the code remained within scope when I was closing the specific database. However if I have code that opens the specific database and then the function ends and afterwards I use the snippet of code to close the said...
  10. aziz rasul

    Iterating Access db's

    MajP, how can I amend your code so that MyDict retains the values of a specific database when run in the opening function and a separate closing function within the same module closes the specific database when the opening function has gone out of scope? Hope that makes sense.
  11. aziz rasul

    Iterating Access db's

    Minty, theDBguy, I didn't realise that you could do that. Would you be able to give me a simple example of how that would work?
  12. aziz rasul

    Iterating Access db's

    That's true Minty. However it would be a nice touch that each of the 5 MS access databases are automatically closed once the data processing has been completed for each database. This way the end user, doesn't have to manually close all 5 MS Access databases. I know that when I have finished...
  13. aziz rasul

    Iterating Access db's

    My issue is slightly different. I have separate code that opens up different MS Access databases. At one point I now want to close a specific MS Access database. To do that I need to grab the particular instance of the specific MS Access file and close it. One way of doing this, I thought, was...
  14. aziz rasul

    Iterating Access db's

    Thanks The_Doc_Man. Point noted regarding cross-posting. What I was essentially trying to do was to import data from an Access table into Excel, once done close that specific db.
  15. aziz rasul

    Iterating Access db's

    Does anyone have any VBA code to be used in Excel that loops through say 5 open Access db's and enables me to close a specific one?
  16. aziz rasul

    Dealing with apostrophe's

    Thanks all, will investigate asap and get back if I still have issues.
  17. aziz rasul

    Dealing with apostrophe's

    I have the following snippet of code which works if strAccumulateHazards does not contain any apostrophe's. However if it does then I get an error in strSQL below. How do I amend the code to prevent such an error? Set rstAccumulateHazards = CurrentDb.OpenRecordset("tblTemp4"...
  18. aziz rasul

    Passing filename to Shell

    Thanks both.
  19. aziz rasul

    Passing filename to Shell

    How would I change the code below if I created a function where I had to pass the value of C:\Test.pdf? varShell = Shell("C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe /A page=3 ""C:\Test.pdf""", vbNormalFocus)
Back
Top Bottom