iif function???

Samual

Registered User.
Local time
Today, 18:13
Joined
May 13, 2003
Messages
18
ive got an invoice for a mail-ordering system. ive also got a form to enter in the order details. if a certain condition is met i need a table with various headings and values to be inserted. if this condition is not met, i don't want the table to be inserted. i managed to do this by having IIf functions for the headings and values in the table, which worked. however, the problem is that i can't do an IIf function for the actual tables and the lines in it...therefore they are always displayed. so i need to find out how to use an IIf function for lines (the table basically) or if there's another way of getting round this problem... appreciate any help
 
Might help to understand your problem if you attached a copy of your database with the necessary objects. JT
 
What exactly are you trying to accomplish? When you say that you are creating tables, does this mean that you are duplicating data in your db? Perhaps what you ar doing in table creations should be accomplished through Queries. Can you be a little more descriptive on the objectives for creating the tables.

Thanks.
 
let me just make it abit clearer...ive got an order form where details of the order are entered. sometimes a certain product is not in stock, in which case there is an option to put 'not available' next to eac product. now when a product is not available, a table (not an access table) appears in the invoice with details of the items that weren't despatched. i did this using iif functions, eg IIF([Availabilty="No",[Product],Null) So if its not available the product along with the quantity are inserted, and if it is available it is left blank-null. the problem is i can't get the lines in my table to do the same i.e. if the products are not available, then the lines appear, and if they are available, the lines do not appear.
i no its abit complicated but thanks for ANY helkp
 
Sam:

I think that you may be saying Table when you mean Form. Is there any chance that you could post a sample of the db to your post so that we could get a better look at what you are trying to accomplish? You can zip it and attach it to a reply.
 
ok im abit busy 2day..ill send it 2morrow.thanks alot
 
(Note: ive tried to make it as clear as possible but if you still don’t understand the problem pleases don’t waste your time and just leave it. Thanks anayway)

This isn’t the real database-its just something I did in a few minutes but it shows exactly what my problem is.
PLEASE FOLLOW THESE STEPS TO UNDERSTAND THE PROBLEM:
1- open ‘order’ form and enter 100 and then close the form
2- open report. A report should be displayed with a small table, a heading and the amount.
3- Now close the report and go to the ‘order’ form again and CHANGE the amount to 200.
4- Open report. The report should be displayed without the heading and the amount but WITH the table. This is because the heading and amount on the REPORT are controlled by IIf functions (check design view of report) whereas the lines of the table (on the report) aren’t

QUESTION: how can I make the lines (on the report) only appear when a certain CONDITION is met just like the heading and amount (on the report)

Appreciate any help.
Sam
 

Attachments

re IIF in reports

Samual,

Have a look at your database now.

Open up your form and enter a number less than 150 or more than 150 then click the report preview button no on the form and it will open report2.

If you enter an amount under or over 150 you will see changes to the report.

open the report in design veiw and look at page header , properties "on format"

What I have done if very rough but should give you some ideas.

if you wanted to do something in the page footer you have to do it there and not in the report (I hope you understand what I mean)

Let me know if this is what you wanted or not as it is nice to get a reply even if I am on the wrong horse.
 
Thanks

Thamks a million John..it worked...really appreciate ure efforts
 

Users who are viewing this thread

Back
Top Bottom