A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Display parameter used for query



 
 
Thread Tools Display Modes
  #1  
Old July 18th, 2008, 10:46 AM posted to microsoft.public.access.queries
Pyrite
external usenet poster
 
Posts: 84
Default 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  
Old July 18th, 2008, 02:54 PM posted to microsoft.public.access.queries
[email protected]
external usenet poster
 
Posts: 87
Default 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  
Old July 18th, 2008, 03:48 PM posted to microsoft.public.access.queries
Pyrite
external usenet poster
 
Posts: 84
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.