Is there a way to remove the cancel button from a window?

  • We have an audit trail, but if you hit cancel it allows you to pass without putting info. Or if you hit the X in the upper right corner it lets you escape without make a choice as well. I need code the makes the user choose an option before continuing on.

  • It would be helpful if we had an idea about what kind of window you're talking about.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Not sure what kind it is...here is the code for the section I'm trying to stop the loophole:

    [/code]

    :IF Len(aOLD[1,K])>0;

    :IF Len(aNEW[1,K])<>Len(aOLD[1,K]);

    cRS:="BOB";

    :WHILE cRS='BOB' .or.Empty(cRS);

    UserInput(350,20,400,240,"Reason",{"cTX,20,160,350,60,TEXT,Field "+aFLDS[K]+" was updated. Choose the reason", "cRS,50,60,200,80,CD,Reason,Entry Error,Sponsor Update,New Bottle,Additional TA Data Provided,Determined at Testing,Spelling Error,Comment Added,Determined at Testing"});

    :IF cRS="BOB";

    UsrMes('Warning','Reason for change must be entered');

    :ENDIF;

    :ENDWHILE;

    :ELSE;

    :IF aNEW[1,K]<>aOLD[1,K];

    cRS:="BOB";

    :WHILE cRS='BOB' .or.Empty(cRS);

    UserInput(350,20,400,240,"Reason",{"cTX,20,160,350,60,TEXT,Field "+aFLDS[K]+" was updated. Choose the reason", "cRS,50,60,200,80,CD,Reason,Entry Error,Sponsor Update,New Bottle,Additional TA Data Provided,Determined at Testing,Comment Added,Determined at Testing"});

    :IF cRS="BOB";

    UsrMes('Warning','Reason for change must be entered');

    :ENDIF;

    :ENDWHILE;

    :ENDIF;

    [/code]

  • That's not a valid response for what I posted.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Angela, what language is this code even written in? I don't recognize it. And while you might be requiring a reason for why a field was changed for audit purposes, how does that tie in with this forum (SQL Server 2005 Security)?

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • I'm sorry I am self-taught on SQL here using StarLIMS which is its own version of SQL but does take most T-SQL commands. The StarLIMS is the front end client that I'm working in (MS SQL2K5 backend). Not quite sure what it is you're asking. I'm attaching a picture of it. Beyond that not sure what it is you are asking.

  • I guess I was thinking of it being audit....security...which forum do you think this fits in?

  • Angela S. (2/2/2010)


    I guess I was thinking of it being audit....security...which forum do you think this fits in?

    For what I have seen so far, none.

    It doesn't look like you have some SQL-related problem, looks like something related to the vendor software. Anyway nothing we could ever help you with.

    Try asking on the vendor's support site.

    Regards

    Gianluca

    -- Gianluca Sartori

  • Angela S. (2/2/2010)


    We have an audit trail, but if you hit cancel it allows you to pass without putting info. Or if you hit the X in the upper right corner it lets you escape without make a choice as well. I need code the makes the user choose an option before continuing on.

    Angela,

    After reading everything here, and viewing the image, I think what you need to do is to get into the language that this application was developed in. Most will have a "OnFormClose" event... tap into that to see if reason was filled out, or bring it back up.

    But, as mentioned, this has nothing to do with SQL.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • like Wayne said, there should be an event for OnFormClose you cna use to prevent the form from being destroyed if a process has not completed; also, you should also have the ability to decide what kind form will be used;

    in the example below, vb.NET changes a form from having the regualr minimize/maximize/close buttons in the right had to use a form with nothing at all if you change the ControlBox property; other languages might call it something different, but it is a property of any windows form.

    similarly you can remove the min/max buttons with the MinimizeBox=false or MaximizeBox=false if the ControlBox = True.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Very strange thing, Lowell, this post is considered harmful by google Chrome. It says http://www.stormrage.com contains malware...

    -- Gianluca Sartori

  • malware? it's just my crappy dev site that holds all my ugly screenshots and script examples; i don't see anything wrong, can you pm me whatever you are seeing?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply