Re: Code error is null

Tech-Archive recommends: Fix windows errors by optimizing your registry



That would be hard without it in front of me and because I don't know all the
business rules.
So this is an insurance claim system? Are you interested in comparing the
date of an accident or claim, or how long the driver has had a license?

As I recall, the drive may not have passed the test (don't know what test we
are talking about) or may not be associated as a driver for the vehicle. Is
this correct? If so, what do you do in that case, or is this what we are
trying to determine?

"dbl" wrote:

> That's is how it works though I am sure it checks with the date the claim
> was made for period the licence was held. Have you any ideas on how I should
> go about setting it up because I must admit I am stuck.
>
> Bob
> "Klatuu" <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:64790590-4CB3-4E06-8E4E-9F1082A5E9A3@xxxxxxxxxxxxxxxx
> > I'll bet if you look for Age it is a function that uses the date funtion
> > to
> > look at the date a license was issued and compares it to the current date
> > and
> > returns a value. The problem you have here is that if the driver is 25 or
> > older and has had his license for less than a year, the value will be 0.
> > It
> > appears it will also be 0 if the driver has not passed the test or no
> > driver
> > is associated with the vehicle. You will have to have a way to tell the
> > difference.
> >
> > "dbl" wrote:
> >
> >> Age is the time a driver has held a licence, sorry if thats not the
> >> answer
> >> you were looking for then I am unsure where age comes from there are no
> >> Age
> >> fields.
> >>
> >> Bob
> >> "Klatuu" <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:DAD444FA-4FDC-4D29-8F51-AAE3FCBF4F6E@xxxxxxxxxxxxxxxx
> >> > You said Text503 is the control with the control source
> >> > =Age([LicHeldDate])
> >> > So, what is Age?
> >> >
> >> > "dbl" wrote:
> >> >
> >> >> Klatuu its a text field with the following as the control source
> >> >> =Age([LicHeldDate])
> >> >>
> >> >> LicHeldDate is a Date/Time field
> >> >>
> >> >> Does that help?
> >> >>
> >> >> Bob
> >> >> "Klatuu" <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> >> news:B3E01645-5010-4F8A-B0A3-36476A2397E5@xxxxxxxxxxxxxxxx
> >> >> >I need to know what age() is. Is it a user defined function? can
> >> >> >you
> >> >> >post
> >> >> > the code for it?
> >> >> >
> >> >> > "dbl" wrote:
> >> >> >
> >> >> >> Klatuu sorry if there is no data in field LicHeldDate (because we
> >> >> >> do
> >> >> >> not
> >> >> >> know when the driver passed the test or there is not a driver
> >> >> >> allocated
> >> >> >> to a
> >> >> >> vehicle).
> >> >> >>
> >> >> >> Text503 returns 0 (I though it was picking up a null blank cell but
> >> >> >> its
> >> >> >> not)
> >> >> >>
> >> >> >> Text503 has the following control source =Age([LicHeldDate])
> >> >> >>
> >> >> >> So the code picks up the <1 part of the Excess "Novice25Plus"
> >> >> >> (Which
> >> >> >> is
> >> >> >> wrong if there is no driver allocated to a vehicle or no date in
> >> >> >> LicHeldFor)
> >> >> >>
> >> >> >> But if the driver has held a licence for less than a full year
> >> >> >> Text503
> >> >> >> returns 0 so how do I get Text503 to be null if there is no data in
> >> >> >> Field
> >> >> >> LicHeldDate? Because this is the only way I can see that it will
> >> >> >> work
> >> >> >> correctly with the amended code you have just posted. Or is there
> >> >> >> a
> >> >> >> better
> >> >> >> way round the problem.
> >> >> >>
> >> >> >> Thanks for your help
> >> >> >>
> >> >> >> Bob
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> "Klatuu" <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> >> >> news:64CB0AF1-7D5F-4757-AFFF-6BBA471F8143@xxxxxxxxxxxxxxxx
> >> >> >> >I have not tested this, but I think it will do the trick. I
> >> >> >> >return
> >> >> >> >99
> >> >> >> >in
> >> >> >> >the
> >> >> >> > Nz() function so that a Null value will translate to a value
> >> >> >> > larger
> >> >> >> > than
> >> >> >> > you
> >> >> >> > are checking for.
> >> >> >> >
> >> >> >> > ed = DLookup(strLookup, "qryCheckRecSent", crit)
> >> >> >> > If Nz(Me.Text503,99) < 1 And Me.ExAge >= 25 Then
> >> >> >> > ed = ed + DLookup("[Novice25Plus]", "qryCheckRecSent", crit)
> >> >> >> > End If
> >> >> >> >
> >> >> >> > "dbl" wrote:
> >> >> >> >
> >> >> >> >> Hi I have the following code which I need to work out how to
> >> >> >> >> tell
> >> >> >> >> it
> >> >> >> >> if
> >> >> >> >> Text503 is null then to ignore this part of the code
> >> >> >> >>
> >> >> >> >> If Me.ExAge >= 25 And Me.Text503 <1 Then
> >> >> >> >> ed = ed + DLookup("[Novice25Plus]",
> >> >> >> >> "qryCheckRecSent",
> >> >> >> >> crit)
> >> >> >> >> End If
> >> >> >> >>
> >> >> >> >> I have tried different ways but all produce the following error
> >> >> >> >> Compile
> >> >> >> >> Error Expected Expression
> >> >> >> >> this is what I have done, how do I put it right?
> >> >> >> >>
> >> >> >> >> ed = DLookup(strLookup, "qryCheckRecSent", crit)
> >> >> >> >> If Me.ExAge >= 25 And Me.Text503 Is Not Null And <1 Then
> >> >> >> >> ed = ed + DLookup("[Novice25Plus]",
> >> >> >> >> "qryCheckRecSent",
> >> >> >> >> crit)
> >> >> >> >> End If
> >> >> >> >>
> >> >> >> >> Any help would be very much appreciated.
> >> >> >> >>
> >> >> >> >> Bob
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
.



Relevant Pages

  • Re: NASCAR Considering Upping Age Limit
    ... pushing the age limit to drive in NASCAR's premier series, Sprint Cup, ... The youngest full-time driver, Reed Sorenson, turns 22 on February 5th. ... Speedway as a 20-year-old the youngest in Sprint Cup ... TO MATURE before he got to Cup? ...
    (rec.autos.sport.nascar)
  • Re: They dont learn
    ... > If I may respectfully ask, At what point do you plan to hang up your ... That is a very good question that every driver should ask themselves. ... it is not a age but an abilities question. ... of the 20 YOAs I see on the road. ...
    (rec.autos.driving)
  • Re: My Ancestor was a Stage Coach Driver
    ... having a marriage date and a date of death (and age at ... to learn to handle a coach and four or six in all conditions.What would be ... a stage driver registered with an official badge ... so the career would be stable boy and horse holder ...
    (soc.genealogy.britain)
  • Re: Another Road Victim
    ... I googled for "age ireland road accidents" but the only relevant hits ... A good driver generally will always be a good driver! ... anyone who commits a serious offence, or a series of minor offences, ...
    (soc.culture.irish)
  • Re: Is it time to take the keys away from our teenage drivers?
    ... And if we are going to discriminate on the basis of age any worse than ... doing that correctly takes MONEY - money we as a society never have ... What's wrong with *real* driver training (at the expense of the ...
    (rec.autos.driving)