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
|
|||
|
|||
Display parameter used for query
I have a query set up to search for people eligible to access a specified
site. An unbound combo box on a form allows the user to select from a predefined list of sites, a button then opens another form which displays the results from the query. In the query the criteria is as follows: [Forms]![frmQryParam]![cboSiteName] This is done on an 'or' basis for five site fields as any one person can have access to up to five sites. For this reason I dont display the site names on the form displaying the queires results as the user will only be interested in one site. So basically, the user selects a site name and the query returns the details (ID No, Forename, Surname) of any one with access to that site in a form. I would also like to display the site name that the user has searched for in that form so they can confirm it and also hopefully realise if they have selected the wrong site by mistake. It is not displaying a result that I want but the actual parameter used in the search. Is this possible? |
#2
|
|||
|
|||
Display parameter used for query
On Jul 18, 2:46*am, Pyrite wrote:
I have a query set up to search for people eligible to access a specified site. An unbound combo box on a form allows the user to select from a predefined list of sites, a button then opens another form which displays the results from the query. In the query the criteria is as follows: [Forms]![frmQryParam]![cboSiteName] This is done on an 'or' basis for five site fields as any one person can have access to up to five sites. For this reason I dont display the site names on the form displaying the queires results as the user will only be interested in one site. So basically, the user selects a site name and the query returns the details (ID No, Forename, Surname) of any one with access to that site in a form. I would also like to display the site name that the user has searched for in that form so they can confirm it and also hopefully realise if they have selected the wrong site by mistake. It is not displaying a result that I want but the actual parameter used in the search. Is this possible? This may be a trick. However, I have created a text edit on the screen or on the report. I set the control source property to =[Forms]![frmQryParam]![cboSiteName]. Note it is the "equals" sign before the name of the control that holds the parameter. |
#3
|
|||
|
|||
Display parameter used for query
Thanks for that, it doesn't seem to work thoough. I created a text box on the
form which displays the query results and put the string in there. All I got was #Name. My original form closes after the name is selected from the drop down box. Basically, frmQryParam opens and has a drop down of all site names. The user selects the site and presses a control button with code : Private Sub btnSearchfrmQryParam_Click() DoCmd.OpenForm "frmEngineersClearedForSite" DoCmd.Close acForm, Me.Name End Sub So it opens the form which runs the query and then closes itself. The form frmEngineersClearedForSite then displays the reults of the query, thats where I want the site name to appear based on what the user selected originally. " wrote: On Jul 18, 2:46 am, Pyrite wrote: I have a query set up to search for people eligible to access a specified site. An unbound combo box on a form allows the user to select from a predefined list of sites, a button then opens another form which displays the results from the query. In the query the criteria is as follows: [Forms]![frmQryParam]![cboSiteName] This is done on an 'or' basis for five site fields as any one person can have access to up to five sites. For this reason I dont display the site names on the form displaying the queires results as the user will only be interested in one site. So basically, the user selects a site name and the query returns the details (ID No, Forename, Surname) of any one with access to that site in a form. I would also like to display the site name that the user has searched for in that form so they can confirm it and also hopefully realise if they have selected the wrong site by mistake. It is not displaying a result that I want but the actual parameter used in the search. Is this possible? This may be a trick. However, I have created a text edit on the screen or on the report. I set the control source property to =[Forms]![frmQryParam]![cboSiteName]. Note it is the "equals" sign before the name of the control that holds the parameter. |
Thread Tools | |
Display Modes | |
|
|