mloucel
Member
- Local time
- Today, 02:33
- Joined
- Aug 5, 2020
- Messages
- 293
Hello Gurus:
Thru trial and error, and with lots of help from many of you here and some other places in the Access world, I was able to proudly create my own message box.
While I thought it was working fine, I found out that was actually failing with a strange behavior I was not aware, so I went to TEST mode and try to check why things were happening, and thou I used a LOT of msgbox to try the code in different parts I cannot figure out what is wrong.
I created a test DB [here attached] where I can show you my issue:
I start with the form frmTest
this one has only 1 button "Test", which then, creates all the parameters to create the Custom MB, I have an important variable called Resp defined as STRING, which will hold the value of the button pressed in the message box, [B1 or B2] this ones can change to Yes/No, Accept/Reject, Continue/Return, etc, it doesn't matter what I display in them at the end is either B1 or B2, I need to check.
This open then MMB [My Message Box], this one then Loads all the Arguments, and determines if B2 has a value or is = to NS, if the value is NS then that button is NOT displayed and button 1 is centered in the form.
HERE IS HE PROBLEM..
It should stop right here, waiting for a button to be pressed, to continue carrying the value of the pressed Button, but it doesn't WAIT and I have no idea why ..
Best is if you can see what I mean.
Please kindly check my Test DB and let me know what is my error.
{DISCLAIMER} I HAD A LOT OF THINGS STRIPPED AWAY AND SOME OF ACKNOWLEDGEMENT OF AUTHOR OF THE CODE WAS DELETED TO HELP ME REDUCE THE SIZE.
Thanks.
Maurice.
Thru trial and error, and with lots of help from many of you here and some other places in the Access world, I was able to proudly create my own message box.
While I thought it was working fine, I found out that was actually failing with a strange behavior I was not aware, so I went to TEST mode and try to check why things were happening, and thou I used a LOT of msgbox to try the code in different parts I cannot figure out what is wrong.
I created a test DB [here attached] where I can show you my issue:
I start with the form frmTest
this one has only 1 button "Test", which then, creates all the parameters to create the Custom MB, I have an important variable called Resp defined as STRING, which will hold the value of the button pressed in the message box, [B1 or B2] this ones can change to Yes/No, Accept/Reject, Continue/Return, etc, it doesn't matter what I display in them at the end is either B1 or B2, I need to check.
This open then MMB [My Message Box], this one then Loads all the Arguments, and determines if B2 has a value or is = to NS, if the value is NS then that button is NOT displayed and button 1 is centered in the form.
HERE IS HE PROBLEM..
It should stop right here, waiting for a button to be pressed, to continue carrying the value of the pressed Button, but it doesn't WAIT and I have no idea why ..
Best is if you can see what I mean.
Please kindly check my Test DB and let me know what is my error.
{DISCLAIMER} I HAD A LOT OF THINGS STRIPPED AWAY AND SOME OF ACKNOWLEDGEMENT OF AUTHOR OF THE CODE WAS DELETED TO HELP ME REDUCE THE SIZE.
Thanks.
Maurice.