Search results

  1. M

    Importing Excel 2007 data into an Access 2007 table.

    That is certainly one way to look at it, pmproszynal. ;)
  2. M

    Importing Excel 2007 data into an Access 2007 table.

    Thank you for the compliment / encouragement... Trouble is, it becomes very implementation specific. Example: The CSV the code I developed reads is hard coded to reading three columns... so if an additional coma is encountered, said line is marked as in error and excluded from the import.
  3. M

    Adding data from Form to Table using VBA

    I would do the OP's proposed scenario in a couple of steps: 1) Use this share code to safely read the form controls into VBA variables: Safely read form field text controls http://www.access-programmers.co.uk/forums/showthread.php?p=1131039#post1131115 Once read, then it is possible to...
  4. M

    Importing Excel 2007 data into an Access 2007 table.

    ROTFLOL!!! "Preaching to the choir!" Due to the non-standardized CSV outputs of Access and Excel, I opted to brute force read Excel outputed CSV data one character at a time in Access VBA code to import data from Excel to Access. It works reliably, but it was tedious / extensive to code in...
  5. M

    Compare two textboxes and highlight the differences

    Note: Access / VBA do cAsElEsS comparisons when using the '=' operator. To get CaSeSeNsItIvE comparisons, I suggest you use the StrComp function with the vbBinaryCompare option selected. Example reworked LOC: If StrComp(Mid(InkNew.Value, i, 1), Mid(InkOld.Value, i, 1), vbBinaryCompare) <> 0 Then
  6. M

    Table field as file path in vba

    I am not familiar with your proposed syntax of reading from a DB table via ! type syntax and going string to where you hope to get the value from as if it is a spreadsheet cell. Since you say you need to read a previously stored value, in database lingo that is a SELECT statement. Here is how...
  7. M

    how to run a module?

    VBA Modules by themselves will not just magically run. A Form could have a Button control on it, and the Button Click event could be defined to call a Function / Subroutine in a VBA Module. Or you could create an "autoexec" Macro to call a Function / Subroutine in a VBA Module when the database...
  8. M

    Error codes to be expected from the VBA.Collection class?

    In my case, I need to be able to access objects in the "container" directly, not having to iterate through the "container" to get to the object I am looking for. Thank you for the suggestion, Chris. Noted for future reference. ;)
  9. M

    Undefined function 'Format Number'

    By your #1 it looked like you were in the VBA Editor \ Tools \ References. That is the only spot I can think of which that list shows up. If you now say (#3) you have no VBA code at all... rrrrr????
  10. M

    Undefined function 'Format Number'

    Please provide the VBA source code which is raising the complaining, and please be sure to use [#] code tags around it, found on the message editor button list.
  11. M

    settin up a control Array

    I do this sort of thing in what I call my Validation classes. These are classes that the AddRecord / EditRecord forms make an instance of, make call to the class passing the call a pointer back to itself, and the class then manipulates the form... reading controls, populating controls, etc...
  12. M

    settin up a control Array

    Is this a bound form, and you wish to verify that Control1 is still bound to Column1, and so on?
  13. M

    Creating an quit program macro with a yes/no message

    You must create the event via the Form Editor if the event does not currently exist. Open the Form in Design View Have the Property Sheet open Event tab, while the "Section Type" pick list is set to Form Locate the "On Unload" event, when you are successfully selected on that event, two buttons...
  14. M

    Error codes to be expected from the VBA.Collection class?

    Your loss. I already posted the 1 LOC fix solution, in #5. So this case is closed. I found it very interesting that the core VBA.Collection class returns different return codes based on what type of variable is used to indicate the desired index location in the VBA.Collection. Others should...
  15. M

    Error codes to be expected from the VBA.Collection class?

    sssiiiggghhh... I referenced where I read / found what I implemented. Here it is again... This is correct. No, the Items class is a custom collection containing instances of the Item class. The collection is inside the Items class, not the Item class.
  16. M

    Error codes to be expected from the VBA.Collection class?

    To test if the Err 9 / "Subscript Out Of Range" conditon might have been caused by my recent change from String to Variant variable type, I converted the working class to Variant. Sure enough, Err 5 the first time an object is Added to the VBA.Collection, and each subsequent call to Add I saw...
  17. M

    Error codes to be expected from the VBA.Collection class?

    m_PrivateCollection is the actual name of the bare VBA.Collection object. So I am using the Item method of that VBA.Collection class to go straight for the particular entry in the VBA.Collection to find out if it exists in the VBA.Collection or not. No loop / iteration code involved. I never...
  18. M

    Error codes to be expected from the VBA.Collection class?

    Well, in another FE DB of this application, I captured the usual Err 5 / "Invalid Procedure Call Or Argument" that I was expecting. However, this class I did not update with my discovery that I am able to search the VBA.Collection objects based on both the Integer ID the object is stored at OR...
  19. M

    Search Box (Form) Issues

    Is this what you had in mind... Find as you type capability http://www.access-programmers.co.uk/forums/showthread.php?t=230401#post1175636 http://www.access-programmers.co.uk/forums/showthread.php?t=219974#post_message_1122778
  20. M

    Error codes to be expected from the VBA.Collection class?

    Greetings, I have found, today, very odd errors in code dealing with the VBA.Collection object. A friend has proposed that perhaps VBA returns a different error when a particular entry was not found in a completely empty VBA.Collection object verses a VBA.Collection having one or more objects...
Back
Top Bottom