Search results

  1. W

    File too large

    The repair / compact size of a database isn't relevant. The second you try to manipulate tables or data in the database, the file size will jump. You can watch your file size balloon in real time - just open file properties and keep an eye on it as your run your functions. If you ever see the...
  2. W

    File too large

    FYI: Splitting a table and splitting the entire database are very different; I am uncertain which option you chose. You should have no trouble joining 2 tables (1 with 100 fields and 1 with 70 fields) in a query, by Primary Key.
  3. W

    File too large

    More than likely when you combine the table with itself in the query, your field count is doubled. ie. take your original 170 and multiply by 2 > 255. ...Resulting in a too many fields type error. As for the 170 fields x 37k records - when you dump the entire thing into a recordset, there...
  4. W

    Is VBA a must?

    Even people making databases simply for their CD collections use VBA. That being said, is it necessary? Absolutely not. You can have a fully functional database without using VBA. However, expect a minimum of functionality, a minimum of security (login forms? nope. Throw them out the window)...
  5. W

    On Error - Assign a value to variable causing error

    :banghead: doh. Simply reversing the order will do it. I was provided the most ridiculous non-normalized "pretty" excel template. I thought the quickest solution would be to just hardcode all the cell positions holding data, then iterate through the forms. Turns out some of the cells have...
  6. W

    Make Code Available to All Forms (Remove Duplication of code)

    Create a new Module (more realistic) pseudocode: Public Function MyOnChangeEvent() with Forms(Application.CurrentObjectName) .Controls("cboManagerID").Requery .Controls("cboManagerID") = "" end with End Function In every form object that you want to use this, you'd add the...
  7. W

    'Like' returning different results in vba vs query builder

    Swap the ' and " - it may make a difference. Also consider removing ' ' from around your ID. Numbers don't need string conversion. Also consider breaking it out for testing purposes ...Like "*" & "Visit" & "*" Then try ...Like "%" & "Visit" & "%"
  8. W

    system resource exceeded

    Could not reproduce error. Following steps above, everything seemed to work fine. Add some code breaks and debug.prints to zero in on the area causing you issues.
  9. W

    system resource exceeded

    WinRar. Also, I'm amazed that there's 90% compression into a .rar format.
  10. W

    On Error - Assign a value to variable causing error

    Is the following possible? If so - how? I have a series of several hundred variables being assigned values. If the value assigned to the variable results in an error, I would like to assign a default value to the variable which caused the error. How do I reference the variable, or line (or...
  11. W

    How to rename table using vba?

    I can't believe it - all these posts and not one reference to the holy grail of database architecture: Please wiki: "Data Normalization" Then combine your 100 tables into 1 so no one here has to ... :banghead:
  12. W

    Opening Excel with a command button

    Test your command button to ensure it works. Do this by completely removing the subform and then testing the command button. It should open the excel file as expected. If this does not occur, there is a problem in your button coding and the problem is independent of any subform conflict. Post...
  13. W

    Macro - VBScript Getting Started

    I think you mean VBA, not VBscript. Just put your "web application link" in the button "Hyperlink Address".
  14. W

    Opening Excel with a command button

    If you KNOW your command button should work and it's not, then MS Access probably already has the excel file open - likely in an exclusive/editing mode preventing any other users access. Revise your subform code to open the file in a read only sharing mode or as a snapshot. Or alternatively...
  15. W

    Duplicates in query

    Given: create query design > View SQL > paste code below SELECT a.PK_Project_StudyDesignID, a.FKProjectID, a.FKStudyDesignID From [TblProject_Study Design] as a Where a.FKStudyDesignID like "*" & [Enter yyy criteria] & "*" Not elegant, but answers your question exactly as you...
  16. W

    desktop icon for the database moves every time I open/close the database

    At the top click: FILE > OPTIONS > CURRENT DATABASE > COMPACT ON CLOSE (uncheck this.) You can manually Compact and Repair the Database by clicking: DATABASE TOOLS > COMPACT AND REPAIR DATABASE
  17. W

    desktop icon for the database moves every time I open/close the database

    You're automatically Compact/Repairing. Check your options and take that off if you don't want it on. Also -- Should probably be a General Question ;)
  18. W

    Executing a DOS command from a module

    There's a wealth of VBA commands to create / manipulate directories and files, including creating text files. I suggest you use these. Otherwise try pseudocode: dim objShell as Object Set objShell = CreateObject("WScript.Shell") strCommand = "cmd /c dir /s" objShell.Run strCommand...
  19. W

    Code Annotation

    1. vb.net/vb6/vba are frequently interchangeable with a slight modification of object declarations. If I can't find what I'm looking for in strict VBA, converting from one of the other languages is a simple solution. I've found the range of talents on this board to be impressive and did not...
  20. W

    Code Annotation

    Below is code to adjust file attributes. Public Shared Sub Main() Dim path As String = "c:\temp\MyTest.txt" ' Create the file if it exists. If File.Exists(path) = False Then File.Create(path) End If Dim attributes As FileAttributes...
Back
Top Bottom