Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. tallenwa

    Comparisons using a changing value

    Thank you. I tried setting the dteVal before, but couldn't get it to work. I'm close, so maybe your code will help. Travis
  2. tallenwa

    Variable Grouping by Date

    Hey, I really appreciate the response. That code greatly simplifies what I had before. But it didn't reset the 20day cycle based on the next date. I think I found someone who can help me crack this nut. I'll have to test their input, but here's the code they provided: Option Compare Database...
  3. tallenwa

    Comparisons using a changing value

    I posted this on the Query forum originally, but it may belong here as it's a module that I'm struggling with. I have a query [20 day vessel summary report query1] that finds the FirstOfBOL for each vessel in my table [20 day vessel Table]. I then have another query that has a...
  4. tallenwa

    Comparisons using a changing value

    I've simplified my question in the thread “Variable Grouping by Date” hoping to get some guideance. I have a query [20 day vessel summary report query1] that finds the FirstOfBOL for each vessel in my table [20 day vessel Table]. I then have another query that has a module[MyGroup3] that...
  5. tallenwa

    Variable Grouping by Date

    Bump. Any help out there would be greatly appreciated.
  6. tallenwa

    Variable Grouping by Date

    I need help writing a module that will sum the total insured value (TIV) for shipments incured within 20days. The module needs to look at the first vessel and set the BOL date for the grouping to 20days beyond. Once the 20day grouping is done, the next date becomes the starting date for the...
  7. tallenwa

    Variable grouping by dates

    You've got it working for me. I had a data error that was breaking the code. Thank you very much and Merry Christmas!
  8. tallenwa

    Variable grouping by dates

    Couldn't have come close w/o your help. I may have to break it into 2 queries as it locks up when I put it to task with a record set of 400+. Thanks again for your help, hopefully you won't here from me again:-). Have a good weekend! -Travis
  9. tallenwa

    Variable grouping by dates

    Paul, Thank you so much. I've been messing with this thing all day. I removed the "Firstof" from your earlier code (dteVal = rst![FirstofB/LDate]) and it appears to WORK! I've added the TIV to the original query and Sum on it, and it appears to work. I'm going to increase my test...
  10. tallenwa

    Variable grouping by dates

    Paul, your patience is beyond what I could ask. I've got the query built and the equation is: my grouping: myGroup([Vessel],[B/LDate]) I have the Total Set to "Expression" The Total for [Vessel] is set to Group By, and the Total for B/LDate is set to First. I cut and pasted the...
  11. tallenwa

    Variable grouping by dates

    You've got me real close now, WAY closer than I was. The query calls the function and provides the grouping, but not quite like I need, so I'll try to clarify. Also, one piece of the puzzle that I over simplified was that the Vessel Name does not remain constant :-(. So my grouping is FIRST by...
  12. tallenwa

    Variable grouping by dates

    Thanks for the help. No, the user will input a starting date and ending date (right now, I've just entered criteria in the in the query field while I try to get it to work). Paul, do I have the function run before the query (as an event in the form), or within it? Can you tell me what the...
  13. tallenwa

    Variable grouping by dates

    I'm trying to write a query/report combination that will group my data by distinct Vessel and dates that are within 20 days of each other. So if I have 8 Vessels, the end result would group the vessels into three groups and sum them. If I could figure how to group them this way, I can easily...
  14. tallenwa

    How do I add fields if dates are within 20days of each other

    I'm not very good at writing SQL, that's why I was hoping to do it in a query or report. In answer to Michael's good question, the 20days is around the first date of the group. Group 1: Vessel A B/L Date 01/01/02 - $100,000 Vessel A B/L Date 01/15/02 - $1,000,000 Group 2: Vessel...
  15. tallenwa

    How do I add fields if dates are within 20days of each other

    Sorry, I used a poor choice for the dates. I'm not trying to extract the "day". I'm trying to sum the value field of the Table if the ship is the same and the BOLdates are within 20days of each other.
  16. tallenwa

    How do I add fields if dates are within 20days of each other

    I'm trying to build a query that sums the value in one field if the "BOLdate" value is within +or-20 days of each other, when it's the same ship. I tried to do this within a report or the underlying query, but haven't had any luck. I can sort and group by month, but don't know how to...
  17. tallenwa

    Selecting unique field

    GLS, I appreciate your patience with my syntax. When I enter in the query field=> Expr1: "SELECT" & [Column] & " FROM test WHERE [MMI] = " & [Row] I get a resulting text string that reads "Select c FROM test Where MMI = II" In the query field, doesn't the...
  18. tallenwa

    Selecting unique field

    Can you elaborate on what you mean by "Topletter being the single char string that is the a,b,c " If my table is called "test", and my first column has the header MMI and the first two fields of my query are called "Row" (corresponding to the I, II, III and...
  19. tallenwa

    If Combo box is NULL Display everything?

    It looks uglier than it is:-) I could get my query to work with an If isnull in the query, but when using a form, it always sent a null value (when blank) and query would then sort for all null values. Look up the OpenReport Method in the help. The IIF statement just sets the report values to...
  20. tallenwa

    If Combo box is NULL Display everything?

    My form ([Loss Ratio Query Form]) has two fields ([FISCAL_YEAR] and [Business]) and I wanted to return all data if one was left blank. I couldn’t ever get it to work in the query. But I ultimately used the query data in a report (the report has two matching fields: [Fiscal Year] and [Business]...

Part and Inventory Search

Back
Top