Closed Thread
Results 1 to 2 of 2

Thread: ending a procedure

  1. #1
    Maikeru1990 is offline Newbie
    Join Date
    Apr 2009
    Posts
    1
    Rep Power
    0

    ending a procedure

    im at college doing this project using delphi for a server and coding and using html and databases to creating a system that you can input details to store and create appointments though i want it to show a message when a field is empty and i click submit button

    because when i click it the message appears but the procedure carrys on and the field gets stored empty still after i click the message off

    any help would be gratefully appreciated
    i feel like its something so simple yet i cant figure it out

    if this helps this is a part of my code to help you.


    //***Fathers Application Form Submit***
    Code:
      quFathersApplicationFormSubmit.Close;
      quFathersApplicationFormSubmit.Parameters.ParamByName('pmFForename').Value := slParamsList.Values['AFFForename'];
        if (slParamsList.Values['AFFForename'] = '') then ShowMessage ('Fathers forename has no value') and quFathersApplicationFormSubmit.Close;
      quFathersApplicationFormSubmit.Parameters.ParamByName('pmFSurname').Value  := slParamsList.Values['AFFSurname'];
        if (slParamsList.Values['AFFSurname'] = '') then ShowMessage ('Fathers surname has no value');
      quFathersApplicationFormSubmit.Parameters.ParamByName('pmFDoB').Value      := slParamsList.Values['AFFDDOB'] + '/' + slParamsList.Values['AFFMDOB'] + '/' + slParamsList.Values['AFFYDOB'];
      quFathersApplicationFormSubmit.Parameters.ParamByName('pmFAddress').Value  := slParamsList.Values['AFFAddress'];
        if (slParamsList.Values['AFFAddress'] = '') then ShowMessage ('Fathers Address has no value');
      quFathersApplicationFormSubmit.Parameters.ParamByName('pmFPostcode').Value := slParamsList.Values['AFFPostcode'];
        if (slParamsList.Values['AFFPostcode'] = '') then ShowMessage ('Fathers Postcode has no value');
      quFathersApplicationFormSubmit.Parameters.ParamByName('pmFStatus').Value   := slParamsList.Values['AFFStatus'];
        if (slParamsList.Values['AFFStatus'] = '') then ShowMessage ('Fathers status has no value');
      quFathersApplicationFormSubmit.Parameters.ParamByName('pmFJobTitle').Value   := slParamsList.Values['AFFJob'];
        if (slParamsList.Values['AFFJob'] = '') then ShowMessage ('Fathers job has no value');
      quFathersApplicationFormSubmit.Parameters.ParamByName('pmFWorkAddress').Value   := slParamsList.Values['AFFWorkAddress'];
        if (slParamsList.Values['AFFWorkAddress'] = '') then ShowMessage ('Fathers job address has no value');
      quFathersApplicationFormSubmit.execSql;
    Last edited by WingedPanther; 04-02-2009 at 03:58 PM. Reason: add code tags (the # button)

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: ending a procedure

    I would do elseif to chain that, with the actual "good" logic in the else statement.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Support Ending for WinXP SP2
    By Irfan_A in forum Computer Software/OS
    Replies: 1
    Last Post: 08-12-2010, 05:28 AM
  2. Never-ending PHP
    By Coldblackice in forum PHP Development
    Replies: 2
    Last Post: 03-06-2009, 01:53 PM
  3. C# ending a program
    By Siten0308 in forum C# Programming
    Replies: 3
    Last Post: 07-24-2008, 01:39 PM
  4. Never ending For
    By NeedHelp in forum General Programming
    Replies: 7
    Last Post: 09-05-2006, 02:50 PM
  5. ending URLs with a '/'
    By skilletsteve in forum HTML Programming
    Replies: 1
    Last Post: 09-02-2006, 03:21 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts