![]() |
|
|
#1
|
|||
|
|||
|
I have 3 (as of right now) different reports that need to be run from the same data in a table. These reports are very similar but vary based on one value in the table. Field "Type" can have one of 3 values: "Flat Oval", "Round", or "Rectangular". I have a form with a button to run a report, but I need it to choose which report to run based on this value.
I thought about using an IIf statement but I don't know if I should put it in the onclick of the button or how to structure it. Thanks in advance for any help. |
|
#2
|
||||
|
||||
|
let me get this straight you have a certain condition that is available on the form and based on that condition u would like to open a specific report try this. suppose the condition is in a textbo1.
if me.textbox1=Condition1 then docmd.openReport ReportName1 elseif me.textbox1=Comdition2 then docmd.openreport ReportName2 else docmd.openreport ReportName3 end if it is not clear whether you want to open the reports view particular reports if so you have to add a criteria if u need 2 do that please let me know. if this solves your problrm please mark this thread as solved |
|
#3
|
|||
|
|||
|
That wasn't exactly what I needed but it did get me on track enough to figure the rest out. Thank you very much, the exact code I used was
If Me.Type = "Round" Then [Round].Visible = True [Rectangular].Visible = False [Flat Oval].Visible = False ElseIf Me.Type = "Rectangular" Then [Round].Visible = False [Rectangular].Visible = True [Flat Oval].Visible = False ElseIf Me.Type = "Flat Oval" Then [Round].Visible = False [Rectangular].Visible = False [Flat Oval].Visible = True Else [Round].Visible = False [Rectangular].Visible = False [Flat Oval].Visible = False End If P.S. I will try to mark it solved but am not 100% sure how to |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How do I choose a record from a list and it populates a form?
|
dalanengle | Access | 3 | 09-26-2009 11:57 AM |
How do i automatically generate #'s not starting with 1???
|
fairygirl85 | Queries | 9 | 04-28-2009 03:42 PM |
| Have database open automatically | Norman Masson | Access | 6 | 01-08-2008 04:41 AM |
| How do I choose multiple records for a report | admaldo | Reports | 2 | 03-03-2006 03:02 AM |
automatically create queries
|
GEORGIA | Programming | 8 | 01-23-2006 11:35 AM |