abissa
asked on
Lotus Part of the code no longer executed
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!
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!
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
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!
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!
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Forced accept.
Computer101
EE Admin
Computer101
EE Admin
ASKER
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"????????