Search results

  1. T

    Selecting a given 'number' of columns...

    Or use this function to replace the Select Case. Function GetRange(intX As Integer) As String Dim intY As Integer If intX < 27 Then GetRange = Chr(64 + intX) Else intY = intX Mod 26 intX = intX \ 26 GetRange = Chr(64 + intX) & Chr(64 + intY) End If End Function selectRegion...
  2. T

    how do I change popup form properties from VBA

    Try open it as a dialog window like this. Docmd.OpenForm "Form2",,,,, acDialog
  3. T

    Returning directory name from filepath?

    How 'bout this one? Function GetPath(strPath As String) As String GetPath = Left(strPath, Len(strPath) - Len(Dir(strPath))) End Function
  4. T

    Copying a database - help

    Or check this post out.
  5. T

    copying .mdb to a CD enables "read-only". How to avoid?

    If you use Windows XP, all files copied from a cd will be removed the Read-Only property out for you automatically. For me, I use the code below to remove the property. Just put it in a start-up form. Though it will pop up the message once and only when the db is first open. Private Sub...
  6. T

    Format spreadsheet from Access vba

    The easiest way, at least to me, is linke the Excel file to Access and then use an append query to your target table. You don't have to worry about the data type.
  7. T

    setting references

    Yes, if that machine has installed Excel. What do you do with Excel? You may not have to set the References to Excel. If you set the reference to Excel, it's called an early binding. You can refer to Excel objects by using a late binding and you don't have to set the reference. This is the...
  8. T

    copy database on open

    You mean every time you open the db, copy it to somewhere else? Or do it once for its life time. If you have a popup form or any form that is open automatically when the db is open, use the function on OnLoad event for the form. Private Sub Form_Load()...
  9. T

    Pausing Code

    You can use Sleep API. Check this http://www.mvps.org/access/api/api0021.htm out.
  10. T

    copy database on open

    Try this function out. Function fCopyFile(strFile1 As String, strFile2 As String) Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") fso.CopyFile strFile1, strFile2, True End Function Open the Immediate window or Debug window and type this in. ...
  11. T

    copy database on open

    Check this article out.
  12. T

    reading sql from query properties?

    You can check this link out as well.
  13. T

    Run Macro from another database

    You can use HyperlinkAddress and HyperlinkSubAddress to help you out. You can use a command button to trigger the event. Just add a command button to a form. Then open its Properties and type a path to your target db in Hyperlink Address and the macro name in Hyperlink SubAddress. You can...
  14. T

    Relative path for linked tables

    As I mentioned in the link above, if you use Access 2000 or higher, you can use CurrentProject.Path to get the current path of the FE mdb. If you use Access 97, you'll need InstrRev() function to help. Check this post for the function. Then use CurrentDb.Name to help to to get the current...
  15. T

    Relative path for linked tables

    You need to relink the tables upon the open of the front end. Check this post out.
  16. T

    Moving data from a Database to Spreadsheet & Activating a macro in a spreadsheet?

    Why do you want to transfer data back and forth? Can you do, I guess the calculation or manipulation, in Access?
  17. T

    ADO Connection

    It has to do with Microsoft Data Access Components (MDAC). Make sure that you have the same version installed. Or check the latest version available at Microsoft Site
  18. T

    Copy Files according to Time Range

    Try this out. ... If Right(objF1.Name, 3) = "txt" And (objF1.DateLastModified Between DateAdd("d", -1, Date) & " 06:00:00 PM" And Now) Then ...
  19. T

    Access Runtime with JPEG Images

    Check this link, Image Control may cause a GPF when browsing between records for the first question. I would use Bitmap format instead of JPEG. You can convert 100s JPG files to BMP by using ACDSee in a few minutes.
  20. T

    Multi Select Code

    I think you need space after IN in your code. Try to add a message box in your code. Then check what returns from the code when you run it. What you see is the strSQL string. It should be sthg. like this SELECT * FROM [Master Table] WHERE [Master Table].[Unit Description] IN...
Back
Top Bottom