If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
form1 OR form2 parmeter box problem
Hi Guys,
I have a report that I want to use from 2 different forms and have added in the criteria section: [Forms].[frm1].[CustID] or [Forms].[frm2].[CustID] The problem is if using either form a parameter box displays, although I can cancel it I would prefer it to not show, can anyone help me with this please TIA |
#2
|
|||
|
|||
form1 OR form2 parmeter box problem
--- UNTESTED ---
Try this as criteria -- IIf([Forms].[frm1].[CustID] Is Null, [Forms].[frm2].[CustID], [Forms].[frm1].[CustID]) "Lez" wrote: Hi Guys, I have a report that I want to use from 2 different forms and have added in the criteria section: [Forms].[frm1].[CustID] or [Forms].[frm2].[CustID] The problem is if using either form a parameter box displays, although I can cancel it I would prefer it to not show, can anyone help me with this please TIA |
#3
|
|||
|
|||
form1 OR form2 parmeter box problem
I would remove every possible dynamice criteria from the query. Use the Where
Condition of the DoCmd.OpenReport method to filter your report records. Dim strWhere as String strWhere = "1=1 " If Not IsNull(Me.CustID) Then strWhere = strWhere & " And [CustID]=" & Me.CustID End If DoCmd.OpenReport "rptCustomer..." , AcPreview, , strWhere -- Duane Hookom Microsoft Access MVP "Lez" wrote: Hi Guys, I have a report that I want to use from 2 different forms and have added in the criteria section: [Forms].[frm1].[CustID] or [Forms].[frm2].[CustID] The problem is if using either form a parameter box displays, although I can cancel it I would prefer it to not show, can anyone help me with this please TIA |
Thread Tools | |
Display Modes | |
|
|