User Profile

Collapse

Profile Sidebar

Collapse
Wade
Wade
Last Activity: May 22 '17, 07:12 PM
Joined: Sep 14 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • How do I filter data using one of two different fields?

    Greetings,

    I have a routine that iterates through many worksheets and Autofilters (using criteria filterStart and filterEnd) a range of data (A8:H200) using (field:=1). The code works well for that. What I want to do is filter using field:=1 unless field:=1 is empty, then I want to filter by another field. I have no idea how to accomplish this.

    Code:
    Sub ApplyDateFilter()
    
        Dim Ws As Worksheet
        Dim filterStart
    ...
    See more | Go to post

  • How do I evaluate if all or some of items in list box are selected

    I have form with a listbox "lstOperator(s) " which is populated by "tblOperators.O peratorName". At the top of the list I have added the option to "Select All". I have added a command button "cmdNext" to the form. If "Select All" is selected in "lstOperato rs", I want to preview a report "rptProduct ion" with no filtering when "Next" is clicked. If only some of "lstOperato rs"...
    See more | Go to post

  • Wade
    replied to Undefined function 'PrevRecVal' in expression.
    Yes, that is the just the type of explanation I need. So, when the term "form" is used, does that specifically mean the MS Access Form object or are Tables, Queries, Forms and Reports all considered, generically, forms. Also, just what is a module? What must a module consist of and what all can be included in a module? Thank all of you for your responses. I'm sure all this will become more clear as I study MS Access further. Jeez,...
    See more | Go to post

    Leave a comment:


  • Wade
    replied to Undefined function 'PrevRecVal' in expression.
    My function statement reads: Function PrevRecVal (Keyname As String, Keyvalue, FieldNameToGet As String).

    I am confused by the sentence in "Microsoft Access 2003 Inside Out": "Use the Public keyword to make this function available to all other procedures in all modules". I want the function to be available to my expression within my query! Translate, please. I have a lot to learn, yet, in MSAccess. Thanks.
    See more | Go to post

    Leave a comment:


  • Wade
    started a topic Undefined function 'PrevRecVal' in expression.

    Undefined function 'PrevRecVal' in expression.

    My query contains a field called TotalIn, which returns number data from an underlying table. I have modified a function, PrevRecVal, which returns the datum form the previous record in the TotalIn field and places it into a field called PrevTotalIn. To accomplish this I inserted, into the query, a new field containing the expression referencing the function. I ran the query and it returned the desired result. However, I then saved the module and...
    See more | Go to post

  • Wade
    replied to Can't get function to work in a query
    Thanks, I'll see if I can work out the code....
    See more | Go to post

    Leave a comment:


  • Wade
    started a topic Can't get function to work in a query

    Can't get function to work in a query

    I am pretty new to Access, especially writing code, but I found code on the web to do just what I want and it is posted below. It returns a field value from a previous record. I found the code at: http://support.microsoft.com/?kbid=210504; many of you have probably seen this code. I have an Access form and a query, both based on exactly the same table, a simple two field table with an ID field and a field of consecutive numbers in consecutive records....
    See more | Go to post
    Last edited by Wade; Sep 15 '06, 10:05 PM. Reason: Clarify posting of code.
No activity results to display
Show More
Working...