Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    2

    Unanswered: Conditional expression

    Help me!
    I am a complete Access-baby, but need to develop a database.

    How can I make a conditional expression?
    I added a textbox in a form header. If the Membership type is individual, I want the textbox to display the first name and last name of the member. If the membership type is organisation, I want the textbox to display the name of the organisation.

    Is this possible? I have tried for hours now and am growing insane!!!!

  2. #2
    Join Date
    Aug 2003
    Location
    Bosnia & Hercegovina
    Posts
    57
    to make it simple I'll explain how to do it with query....

    instead of using your selected table, you'll have to create a query based on the table.....

    select all the fields from the table....

    add a field in the query:

    SelectedText: iif([Table]![MembershipType] = "organisation", [Table]![OrganisationName], [Table]![IndividualName])

    this will give you field SelectedText that you can show on the form.....

    there is another post that explains iif function, and you can look it up in help as well, it's quite useful function and can give you a solution for very complex problems.....

  3. #3
    Join Date
    Aug 2003
    Posts
    2
    Thanks for that! I'll try it out immediately.

Posting Permissions

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