Recent content by Macropheliac

  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.
Back
Top Bottom