Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004

    Unanswered: Listbox and IF statements help please

    My listbox has several colums.

    I have a command button on the form that I want to run a particular piece of code - but only if "column 5" of the listbox is populated with data.

    If "column 5" is not populated I do not want the code to run.

    What would be the correct IF function to put in the on-click event of the command button?


  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    depending on the detail desing of the form, eg how "column 5" is populated, what you are trying to do with the command button.....
    you need to insert the code into selected events

    the events to be looked at are:-
    the forms "on current", set when the record changes / is re-displayed
    the control for "column 5" lost focus event
    you mnay also need to insert the same function call in the forms before update.
    if "column 5" is a boolean (yes/no) value then you could set the code in the controls on change event,

    just as an aside I presume your are NOT using "column 5" as the name of the column in the table. Lots of reasons, first of which is try to give a more descriptive or meaningfull name for the the column which represents the data actaully stored in the table also try to avoid using a space in a column name (it can cause problems with soem SQL implementations).

  3. #3
    Join Date
    Aug 2004
    Column(5) is just text and is called VIDEO.

Posting Permissions

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