Good morning, Access gurus!
I'm having a brain fart and can't seem to wrap my head around the
logic for this problem, so I'm hoping someone out there can help me
out. Here's my situation:
I have a table of debts placed by clients (we're a collection agency).
tblDebts:
DebtID (autonumber pk)
ClientID (string)
ListDate (date)
ListAmt (double)
What I need to determine is whether a debt is considered New Business
or Repeat Business. A function that returns a boolean (e.g.
CountAsNewBiz) would be fine for my purposes. A new client placement
is either a) a placement by a client who's never placed with us
before; or b) a placement by a client who hasn't placed a debt in over
a year. We then have an activation period of 30 days in which we
count any placements as New Business. Once the 30 days expires,
placements are considered Repeat Business.
Here are a few examples:
ClientID 1234A places a debt on 01/15/07 for $100. They have never
placed with us before, so any placements listed between 01/15/07 and
02/14/07 should be considered as New Business.
ClientID 3456B places a debt on 01/15/07 for $100. The first time
this client placed with us was 12/31/02. They have been continuously
placing over the years, and last placed a debt on 01/12/07. This
placement should be considered as Repeat Business.
ClientID 56789C places a debt on 01/15/07 for $100. The first time
this client placed with us was 12/31/02. The last time this client
placed with us was 12/31/05, so there has been a gap of over a year.
This placement should be considered New Business.
ClientID 56789C now places another debt on 01/20/07 for $150. Since
01/15/07's placement was considered New Business and it's between
01/15/07 and 02/14/07, this debt is also considered New Business.
Anything placed after 02/14/07 would be Repeat Business.
If my explanation is unclear, please let me know.
Thanks in advance for your suggestions,
Jana 3 1970
Prior Activity (Y/N)?
If N then NEW.
If Y then...
Activity within the last 30 days (Y/N)?
If Y then...
Prior Activity 30 days old (Y/N)?
If Y then Repeat.
If N then NEW.
If N then...
Activity within last year (Y/N)?
If Y then REPEAT.
If N then NEW.
Thats my best guess anyway...
On Feb 27, 10:17 am, "Jana" <Bauer.J...@gma il.comwrote:
Good morning, Access gurus!
I'm having a brain fart and can't seem to wrap my head around the
logic for this problem, so I'm hoping someone out there can help me
out. Here's my situation:
I have a table of debts placed by clients (we're a collection agency).
tblDebts:
DebtID (autonumber pk)
ClientID (string)
ListDate (date)
ListAmt (double)
What I need to determine is whether a debt is considered New Business
or Repeat Business. A function that returns a boolean (e.g.
CountAsNewBiz) would be fine for my purposes. A new client placement
is either a) a placement by a client who's never placed with us
before; or b) a placement by a client who hasn't placed a debt in over
a year. We then have an activation period of 30 days in which we
count any placements as New Business. Once the 30 days expires,
placements are considered Repeat Business.
Here are a few examples:
ClientID 1234A places a debt on 01/15/07 for $100. They have never
placed with us before, so any placements listed between 01/15/07 and
02/14/07 should be considered as New Business.
ClientID 3456B places a debt on 01/15/07 for $100. The first time
this client placed with us was 12/31/02. They have been continuously
placing over the years, and last placed a debt on 01/12/07. This
placement should be considered as Repeat Business.
ClientID 56789C places a debt on 01/15/07 for $100. The first time
this client placed with us was 12/31/02. The last time this client
placed with us was 12/31/05, so there has been a gap of over a year.
This placement should be considered New Business.
ClientID 56789C now places another debt on 01/20/07 for $150. Since
01/15/07's placement was considered New Business and it's between
01/15/07 and 02/14/07, this debt is also considered New Business.
Anything placed after 02/14/07 would be Repeat Business.
If my explanation is unclear, please let me know.
Thanks in advance for your suggestions,
Jana
On Feb 27, 9:36 am, "DavidB" <j...@yahoo.com wrote:
Prior Activity (Y/N)?
If N then NEW.
If Y then...
Activity within the last 30 days (Y/N)?
If Y then...
Prior Activity 30 days old (Y/N)?
If Y then Repeat.
If N then NEW.
If N then...
Activity within last year (Y/N)?
If Y then REPEAT.
If N then NEW.
Thats my best guess anyway...
On Feb 27, 10:17 am, "Jana" <Bauer.J...@gma il.comwrote:
Good morning, Access gurus!
I'm having a brain fart and can't seem to wrap my head around the
logic for this problem, so I'm hoping someone out there can help me
out. Here's my situation:
I have a table of debts placed by clients (we're a collection agency).
tblDebts:
DebtID (autonumber pk)
ClientID (string)
ListDate (date)
ListAmt (double)
What I need to determine is whether a debt is considered New Business
or Repeat Business. A function that returns a boolean (e.g.
CountAsNewBiz) would be fine for my purposes. A new client placement
is either a) a placement by a client who's never placed with us
before; or b) a placement by a client who hasn't placed a debt in over
a year. We then have an activation period of 30 days in which we
count any placements as New Business. Once the 30 days expires,
placements are considered Repeat Business.
Here are a few examples:
ClientID 1234A places a debt on 01/15/07 for $100. They have never
placed with us before, so any placements listed between 01/15/07 and
02/14/07 should be considered as New Business.
ClientID 3456B places a debt on 01/15/07 for $100. The first time
this client placed with us was 12/31/02. They have been continuously
placing over the years, and last placed a debt on 01/12/07. This
placement should be considered as Repeat Business.
ClientID 56789C places a debt on 01/15/07 for $100. The first time
this client placed with us was 12/31/02. The last time this client
placed with us was 12/31/05, so there has been a gap of over a year.
This placement should be considered New Business.
ClientID 56789C now places another debt on 01/20/07 for $150. Since
01/15/07's placement was considered New Business and it's between
01/15/07 and 02/14/07, this debt is also considered New Business.
Anything placed after 02/14/07 would be Repeat Business.
If my explanation is unclear, please let me know.
Thanks in advance for your suggestions,
Jana- Hide quoted text -
- Show quoted text -
Thanks, I'll give it a shot.
On Feb 27, 9:57 am, "Jana" <Bauer.J...@gma il.comwrote:
On Feb 27, 9:36 am, "DavidB" <j...@yahoo.com wrote:
Prior Activity (Y/N)?
If N then NEW.
If Y then...
Activity within the last 30 days (Y/N)?
If Y then...
Prior Activity 30 days old (Y/N)?
If Y then Repeat.
If N then NEW.
If N then...
Activity within last year (Y/N)?
If Y then REPEAT.
If N then NEW.
Thats my best guess anyway...
On Feb 27, 10:17 am, "Jana" <Bauer.J...@gma il.comwrote:
Good morning, Access gurus!
I'm having a brain fart and can't seem to wrap my head around the
logic for this problem, so I'm hoping someone out there can help me
out. Here's my situation:
I have a table of debts placed by clients (we're a collection agency).
tblDebts:
DebtID (autonumber pk)
ClientID (string)
ListDate (date)
ListAmt (double)
What I need to determine is whether a debt is considered New Business
or Repeat Business. A function that returns a boolean (e.g.
CountAsNewBiz) would be fine for my purposes. A new client placement
is either a) a placement by a client who's never placed with us
before; or b) a placement by a client who hasn't placed a debt in over
a year. We then have an activation period of 30 days in which we
count any placements as New Business. Once the 30 days expires,
placements are considered Repeat Business.
Here are a few examples:
ClientID 1234A places a debt on 01/15/07 for $100. They have never
placed with us before, so any placements listed between 01/15/07 and
02/14/07 should be considered as New Business.
ClientID 3456B places a debt on 01/15/07 for $100. The first time
this client placed with us was 12/31/02. They have been continuously
placing over the years, and last placed a debt on 01/12/07. This
placement should be considered as Repeat Business.
ClientID 56789C places a debt on 01/15/07 for $100. The first time
this client placed with us was 12/31/02. The last time this client
placed with us was 12/31/05, so there has been a gap of over a year.
This placement should be considered New Business.
ClientID 56789C now places another debt on 01/20/07 for $150. Since
01/15/07's placement was considered New Business and it's between
01/15/07 and 02/14/07, this debt is also considered New Business.
Anything placed after 02/14/07 would be Repeat Business.
If my explanation is unclear, please let me know.
Thanks in advance for your suggestions,
Jana- Hide quoted text -
- Show quoted text -
Thanks, I'll give it a shot.- Hide quoted text -
- Show quoted text -
David:
Thanks very much for your assistance! Here's what I came up with as my
final function (I still need to add error handling and clean up my
naming). I'm doing a reality check on my results, but so far I
haven't found any anomalies:
Function isNew(CltID As String, LD As Date) As Boolean
Dim potFirstAD
Dim lst30 As Date
Dim AD As Date
lst30 = LD - 30
Select Case DCount("[LIST_DATE]", "DEBT", "[CLT_ID] = '" & CltID & "'
and[LIST_DATE] >= #" & lst30 & "#")
Case 0
'No biz in past 30 days
potFirstAD = LD
Case Is 0
potFirstAD = CDate(DMin("[LIST_DATE]", "DEBT", "[CLT_ID] = '" &
CltID & "' and[LIST_DATE] >= #" & lst30 & "#"))
End Select
AD = DMin("[LIST_DATE]", "DEBT", "[CLT_ID] = '" & CltID & "' and[LIST_DATE] BETWEEN #" & potFirstAD - 365 & "# AND #" & potFirstAD &
"#")
If LD - AD <= 30 Then
isNew = True
Else
isNew = False
End If
End Function
Once again, this group is a fabulous resource.
Jana This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John Bentley |
last post by:
John Bentley:
INTRO
The phrase "decimal number" within a programming context is ambiguous. It could
refer to the decimal datatype or the related but separate concept of a generic
decimal number. "Decimal Number" sometimes serves to distinguish Base 10
numbers, eg "15", from Base 2 numbers, Eg "1111". At other times "Decimal
Number" serves to differentiate a number from an integer. For the rest of this
post I shall only use either...
|
by: lucpustjens |
last post by:
Hello,
I want te determine the client operating system, because I need to kno
the default cookie directory. If there is a way to determine the cooki
directory directly, than it is also good.
the used OS te determine are:
win 95, win 98, win ME, win XP, win NT
Thanks for help,
|
by: Mike |
last post by:
Is there a way to determine what a user's default email client is? I
read a post from 3 years ago that said no. I guess I'm hoping
something has come along since then.
|
by: Dan |
last post by:
All,
I am working on an application that allows users to track
various items for various clients. For example Client A
may have an object Box where Client B has an object
Canister. When a user goes to enter a new object I would
like the application to determine what objects are
available based upon the client (easy enough) and when
they determine what object to enter the program would know
that it needed to instantiate an object of...
|
by: mykidisgollum |
last post by:
Greetings,
We've recently been working with our site pages' viewstate, turning
off unnecessesary viestate items to reduce page size for faster
loading. We are also experimenting with using less tables etc.
What is the best way to determine the amount of data passed from
server to client in an ASP.NET page run? Right now the only way we
know is to view source, save source and view the file size properties.
I believe this may not...
| |
by: Stan |
last post by:
When a webservice is called through BeginInvoke asynchrously and an
exception is thrown, this exception is not propagated to the client
(obviously). Asynch client simply does not care about it.
However, there are cases when the client would like to call the same
webservice synchronously. In such a case the client will be interested in
receiving the exception and displaying it to the user, or do whatever he
needs to do with it.
Adding...
|
by: semedao |
last post by:
Hi all,
I view many posts about this issue , the connected property does not tell us the current status of the socket.
based on couple of suggestions of msdn , and some article here , I try to write an helper method that will tell if the socket is connected or not , but it's not working good
continue to tell me that the socket is connectedeven if the other party already call shutdown(both) + close , or , even if the other party close the...
|
by: Jon Slaughter |
last post by:
Can someone point me to some resources on how to tile an image to create a
border?
<td>
<img src="images/MTile.png" width="1" height="30" alt=""></td>
I have something like that where I need to repeat x times where x depends on
the width of the browser. (Not sure if its a good idea to use a bitmap of
width 1 but I could use one that is larger and then use both(e.g., maybe one
that is 10 pixels wide and repeat that as needed and let...
|
by: Bob Johnson |
last post by:
How can I programmatically determine when a MDI child form has been dragged
from one location to another within its MDI parent form? Ideally I'd like to
trap some event that occurs when the dragging has stopped.
Thanks.
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |