?
Solved

Lotus Part of the code no longer executed

Posted on 2007-10-08
7
Medium Priority
?
187 Views
Last Modified: 2013-12-18
Hi All,

Here's my problem: I'm developping a lotus notes database for creation of request, where users just have to fill a form and the request is automatically processed. Part of my code is used for checking whether or not a field has a value, and, if not, prompt the user with an error message.
Until this morning, it worked perfectly. even though, I tried to add a "Save as draft" button, add a if statement at the beginning of my code, it seemed to work fine, when I realized the control field wasn't working anymore. I simply removed my If statement to have the original code, but it doesn't work as before....
Here's an example of my code (it's located in QuerySave of the form, and it's not in an IF statement or a sub, or a loop....) :

      Msgbox("Draft!!!! 2")
      
      If doc.Type1_1(0) = "" Then
            MsgText= MsgText + "Specify a value for Type/Media." + Chr$(13)
      End If
      
      Msgbox("Draft!!!! 3")

The If statement worked perfectly as of this morning. Now, when I process the request, before closing, I can see two popup: "Draft!!! 2", then "Draft!!! 3", but the code beetween isn't working! My field Type1_1 has no value, so it should work and display an error message( it was before this morning!!)!!!!!!!!
I'm getting crazy on this thing. Is it possible I disabled something? I put a lot of Msgbow all along my code, it's properly displayed but part of the code beetween never work, where some other part work fine!
Great thanks by advance for all those motivated to check this problem!
0
Comment
Question by:abissa
6 Comments
 
LVL 2

Author Comment

by:abissa
ID: 20033700
More inof (it it can help):

I added in my code the following:

      Msgbox("Draft!!!! 2 The RqTitle field value is:" + doc.RqTitle(0))
      
      If doc.RqTitle(0) = "" Then
            MsgText= MsgText + "Specify a value for Request Title." + Chr$(13)
      End If
      
      Msgbox("Draft!!!! 2")

This way, I check the value of the field before testing it. If, while creating the request, I enter "somthing" in the field, when I save the request I have two pop up:
"Draft!!! 2 The RqTitle field value is: somthing"
and
"Draft!!! 2"
So definitly, it's reading my code. So why, when the value is NULL, it doesn't display the stupid pop up " Specify a value for Request Title"????????
0
 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 672 total points
ID: 20035147
This might be a stupid question, but are you checking MsgText at the end of your code and displaying it when it is not a NULL string?  I don't see any mention of a message box that displays the MsgText string in your posts.
0
 
LVL 63

Assisted Solution

by:SysExpert
SysExpert earned 664 total points
ID: 20035312
I think that it may not be an actual null.

1) I always use trim before checking fields, since there may be default blanks.
2) Check the default field value again., and also print out the Length of the data.

I hope this helps !
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:abissa
ID: 20039963
First, thanks to both of you for the answer.
Then, I gave 500 points to the question as it was quite urgent, but without any answer two hours later, I just used an old backup and spent a lot time updating the old form.
But I'm still curious about what went wrong.
Anyway, I'm closing this post without giving any points, but thanks for the idea thought.
Bye!
0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 664 total points
ID: 20044449
Ha! 2 hours and no answer, I guess this iste is falling apart.  Ask for a refund for your Premium Membership. LOL

Seriously, though, Bill is right.  You used to have code at th ebottom that looked something like:

If MsgTxt <> "" Then
  Msgbox MsgTxt
  Cancel = True
End If
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20295895
Forced accept.

Computer101
EE Admin
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question