Search results

  1. M

    Duplicate Loop

    Oh. I forgot the number of duplicates was dictated by the user input. Sorry. I'm glad you got it.
  2. M

    Duplicate Loop

    Maybe someone else has something better for that, but have you ever used the DCount function? http://www.techonthenet.com/access/functions/domain/dcount.php
  3. M

    Duplicate Loop

    Use nz with your controls: NZ(Me!APS_RMA) http://www.techonthenet.com/access/functions/advanced/nz.php
  4. M

    Duplicate Loop

    No. I wasn't suggesting that. I'd have to study and understand your code a bit more before suggesting how to drop a loop. I was suggesting changing the outer loop to: Do While Check=True Loop
  5. M

    Duplicate Loop

    It's difficult to see what you're trying to do, but maybe try Do while check=true at the beginning instead of Loop until check=false at the end.
  6. M

    runtime 438 error

    Is this code initiated from Access? EDIT: lol! Bob beat me to it!
  7. M

    CurrentDb.OpenRecordset

    No argument here, Bob. I am a novice compared to you. I do understand the advantage of reusable functions. I use many of them. I also remember just starting out in VBA and being lost. ;) Once I studied what a function could do and how it worked, I was able to create a generic one from it.
  8. M

    CurrentDb.OpenRecordset

    lol! Bob is absolutely correct, but the codes and methods used would have to be completely revamped. I'd rather have several specific functions that are easily used instead of a generic one that I have to run around in circles to use anyway.
  9. M

    CurrentDb.OpenRecordset

    You're very welcome. We're all learning as we go along. Especially me. ;)
  10. M

    runtime 438 error

    I don't think you can select a workbook. Try omitting that and using Workbooks("statCompile.xlsm").Sheets("Summary") In truth, you shouldn't select at all.
  11. M

    CurrentDb.OpenRecordset

    Private Sub Command2_Click() Call SendTQ2XLWbSheet("qryExportToExcel", "TFDNA311SampleInfo", "C:....\TF-DNA311_Template.xlsx", Me.PlateName) End Sub Public Function SendTQ2XLWbSheet(strTQName As String, strSheetName As String, strFilePath As String, strPlateName) End Function ' strTQName is the...
  12. M

    CurrentDb.OpenRecordset

    Okay. So, your code is looking for e record "PlateName" instead of the value from the combobox. Try setting another variable in your function such as strPlateName and pass it from the click event. Either that or use Forms!YourForm!Platename.
  13. M

    CurrentDb.OpenRecordset

    Is PlateName the name of your control? Where is this code stored? Is it in the form module?
  14. M

    CurrentDb.OpenRecordset

    Did you add the [ ] around Plate Name? Can you post your rewritten code?
  15. M

    CurrentDb.OpenRecordset

    That error indicates no matching records were found. Check your query is actually looking for recoeds that exist.
  16. M

    Running code on start up

    I just added some stop commands and stepped through the code. It hangs on the Shell command for a few minutes, doesn't open the new DB and continues to the CloseFECreator function. So, the issue is with the Shell command.
  17. M

    Running code on start up

    Okay. I added the code to the Load event of the form and set the form to load on open. The new database is actually created but the current Db hangs and the new DB doesn't open. Maybe I'm more ignorant than I thought, but how can I access the immediate window when code is running on start up? ;)
  18. M

    Running code on start up

    I certainly will, RX. It'll take me a little bit to "put it back together" as I have it "torn apart" at the moment. lol
  19. M

    Running code on start up

    Yes. I'm not new to VBA. Just to Access. That's what's so confusing. There is no error. When I run the code manually from a button, it runs like a charm. However, when it runs on start up, the current DB just hangs and eventually closes.
  20. M

    Running code on start up

    Just to explain that a little further... it's basically a size constraint. Text files are small enough in size that they can access them without special permissions. Anything over a couple of MBs is too large.
Back
Top Bottom