Search results

  1. F

    How to call Function from Query?

    Thank you so much once again!
  2. F

    How to call Function from Query?

    Thank you; that's great! But from the query, how do I call the function?
  3. F

    How to call Function from Query?

    The query is intended to return backorder information for the previous 10 business days. The function is intended to determine what the first business day in the previous 10 is (there are no backorders on non-business days). The function uses two counters, one (datecounter) is by date, and...
  4. F

    How to call Function from Query?

    I have a user-definied function in a module that contains a Do Until Loop that works backward to determine the start date. I also have a query that uses Between [StartDate] and Date(). Specifically this queries back 10 business days, and the function looks backward to eliminate company...
  5. F

    VBA Module with SQL help

    Will absolutely do. Thank you again.
  6. F

    VBA Module with SQL help

    Hooray! I found it... In the code: Case Is < 10 strMyDefaultValue = strMyDefaultValue = "000" & CStr(intPeriodMaxValue) The second = should be &. Just a mistype. Thanks again so much for your help!
  7. F

    VBA Module with SQL help

    P.S. I inserted a MsgBox after that section that tells me the value of intPeriodMaxValue, which in this case is 1. Perhaps this provides a clue.
  8. F

    VBA Module with SQL help

    Ken, I can't tell you how much I appreciate this. Obviously I am in over my head. I replaced the section from Set rs = ... to rs.close with the new code: Set rs = db.OpenRecordset(strSQL) If IsNull(rs!lastnumber) Then intPeriodMaxValue = 1 Else...
  9. F

    VBA Module with SQL help

    Hmmm, now I get "Invalid use of Null" at this line: intPeriodMaxValue = rs!LastNumber + 1 Should LastNumber be substituted? Thanks again (sorry to be a pain).
  10. F

    VBA Module with SQL help

    Thank you again. Unfortunately at the line Set rs = db.OpenRecordset(strSQL) I get the error: Run-time error '3061': Too few parameters. Expected 1. The "change these" variables are now: strMyFieldName = "RefNumber" strMyTableName = "SPRRTable" The SQL is now...
  11. F

    VBA Module with SQL help

    I do appreciate it!
  12. F

    VBA Module with SQL help

    It should definitely not exceed 100 in a month. Realistic max is probably 30 (and that would be rare).
  13. F

    VBA Module with SQL help

    Yes, it will be fine. Thanks!
  14. F

    VBA Module with SQL help

    The final result field (really the only one that matters :)) is called RefNumber. That is the one with the format 20080701, 20080702, 20080801, etc. Thanks!
  15. F

    VBA Module with SQL help

    Hmmm... maybe there's a much simpler way. The ultimate goal is to provide a RefNumber field that is the year, month, and then counts from one up. 20080701, 20080702, 20080703, ..., 20080801, 20080802, 20080803,...,20080901, etc. I actually got this code from my brother. I expected the SQL...
  16. F

    VBA Module with SQL help

    Please help me debug the following. The problem appears to be with my SQL statement, as I get the error: "Run-time error '2342': A RunSQL action requires an argument consisting of an SQL statement." Here is the code (with MsgBox added to help me keep track; both come out correct)...
  17. F

    What Method for conditions in a record

    Thank you both very much. It works beautifully.
  18. F

    What Method for conditions in a record

    i have 2 command buttons. Once one is pressed, an invisible flag is selected, the first button is made invisible, and the second button becomes visible and enabled. What method do i use when a record is loaded so that the flag is checked to determine which button should be visible upon later...
  19. F

    Subform filter issue

    Thank you. Unfortunately the link was not particularly helpful to me. i am indeed trying to display subform records based on combo boxes in the main form. From there, i would like the user to be able to select the specific record and have it open yet a different form (which happens to be...
  20. F

    Subform filter issue

    Hi, guys, i have a little problem. i have a form (called RDR Search) which is used to search for a specific record in a table by one of three fields: SupplierCode, PLNumber, or Date. There is also a subform listing these three fields below, filtered from a main table. The field opens to these...
Back
Top Bottom