Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

variable numeric long not 0 when empty

variable numeric long not 0 when empty

variable numeric long not 0 when empty


I hope everybody have a nice sunday.

I have a malfunction that I don't understand when using a variable containing a date.

In a browse, I have events and their dates. I need to know the average of these dates for using in others procedures.

So I created a global variable (numeric long with @d06 picture) in the module that contains all relevant procedures and, with the browse template (Action/Totaling), I calc the average of these date.(see http://wgnt-elevage.cwebh.org/Wgnt-Elevage/DownLoa...)

This way is good when there is records in the browse,(see http://wgnt-elevage.cwebh.org/Wgnt-Elevage/DownLoa...) but when there is no record, my global variable is not 0 but a fanciful(?) string (see http://wgnt-elevage.cwebh.org/Wgnt-Elevage/DownLoa...) and so conditions calcs are false.

to track the problem I whrite this code in the embed "On insert after record is primed" on the update procedure (MAJ-Saillies)

! Initialisation
if MoyenneDateSaillies = 0 then
message('Moyenne =0')! Debug
if REP:MoyenneDureeGestation = 0 then
SAI:DatePrevisionMiseBas = SAI:DateSaillie + 62
SAI:DatePrevisionMiseBas = SAI:DateSaillie + REP:MoyenneDureeGestation
end ! if REP:MoyenneDureeGestation = 0
message(MoyenneDateSaillies) ! Debug : Result => http://wgnt-elevage.cwebh.org/Wgnt-Elevage/DownLoa...
if REP:MoyenneDureeGestation = 0 then
SAI:DatePrevisionMiseBas = MoyenneDateSaillies + 62
SAI:DatePrevisionMiseBas = MoyenneDateSaillies + REP:MoyenneDureeGestation
end ! if REP:MoyenneDureeGestation = 0
end ! if MoyenneDateSaillies = 0

could you help me

best regards


RE: variable numeric long not 0 when empty

Everybody on hollydays?


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close