Search results

  1. H

    add multiple records at once to a child table from a form

    Thanks MarkK, that is a neat trick. I'm guessing it works because of the way the relationships are defined. I'm using Access as a front end though, my data actually resides in SQL server, so I will need to see if adding cascade update to the relationships there will work. Even if it doesn't I...
  2. H

    add multiple records at once to a child table from a form

    Thanks MarkK, I think I'm doing something like that elsewhere in my data entry form, using a combo box to add a single record to a different linked table. I'm not seeing how your sub forms would allow the user to select more than one item at one time though, which is what I was shooting for. If...
  3. H

    add multiple records at once to a child table from a form

    That did it! Who knew that making things easier for users would require so much code. Thanks!
  4. H

    add multiple records at once to a child table from a form

    Yes, you have the structure correct. All the examples I have seen have been using the multi-select listbox to add selections to the WHERE clause in a select query, so they just keep adding the values to the string. I think what I might be missing is that I need to run the sql with each loop. Is...
  5. H

    add multiple records at once to a child table from a form

    Hi Isskint, thanks for responding. I've seen that solution before, and I seem to be missing something. If I create a new variable for each selection, then how do I add them all to the same field in the child table? Should I have a child table with one field for each online network instead? I...
  6. H

    add multiple records at once to a child table from a form

    Hi folks, I have an unbound new contact data entry form that adds records to many different tables. I have no problems adding one record to a child table at a time, but one of the things we are collecting is a list of online networks a person belongs to, and I want to be able to stick a "check...
  7. H

    error 2950 running code from a macro

    After doing some further research, I found a solution. Instead of running the code from a module, I created a blank form and copied it to its OnLoad event. Then I opened and closed the form on my macro and it all worked fine. Someone in my office suggested that the reason the code wasn't running...
  8. H

    error 2950 running code from a macro

    If I hit the play button at the top of the code directly from the VB editor, it runs fine. No stops, does what it is suppose to do. If I use "RunCode" in a macro, the macro runs up to that point creating and updating tables but then stops when the error message box pops up. If I convert the...
  9. H

    error 2950 running code from a macro

    I have about 20 queries to run before the code, and another 15 or so afterwords. I just tried to "convert macro to code" and while it doesn't crash with the error, it also doesn't run any queries after the error either. I could just break the whole thing up and deal with the crash if that's the...
  10. H

    error 2950 running code from a macro

    I have to admit there is a real possibility that I am just doing something stupid here, so I might as well post the code. What it does is divide up groups of 8 sampling units up among stations as close to each other as possible, so if I have a total of 15 sampling units, one will get 8 and...
  11. H

    error 2950 running code from a macro

    Not when called from a macro, even if it is the only thing the macro is doing. I suspect I am missing a command at the end of the function that would tell it to return to the macro. I've tried adding "Exit Function" and "Return" but they don't seem to have any effect at all. It runs just fine on...
  12. H

    error 2950 running code from a macro

    the function does run correctly, the macro just won't run anything after the code is called. I get the error code instead.
  13. H

    error 2950 running code from a macro

    All I have is the code "2950" which Microsoft says is "This issue occurs if the database is not trusted by Access 2007. By default, Access 2007 opens databases that are not trusted in Disabled mode. In Disabled mode, executable content is disabled." But I checked that, and it is in a trusted...
  14. H

    error 2950 running code from a macro

    Most of what I do can be done with queries, but I have a spot that I need a bit of code for. I've written the code as a public function so I can call it from a macro where I run the rest of the queries. The code runs fine on its own, and so does the macro until it hits where I call the code...
Back
Top Bottom