Selecting in combo box rather than using, Like [enter] & "*"

D

dd

I've got a report based on a query. The query asks the user for a SITE
location. It would be useful if I could create a form which lists the sites
in a combo box so that the user can select a site rather than typing it in.
Is there an easy way to do this?

SELECT SurveyData.[Date of Survey], SurveyData.Site, SurveyData.Element,
SurveyData.Condition, SurveyData.PriorityRef, SurveyData.[Revenue Cost],
SurveyData.[Revenue Comments], SurveyData.[Remaining Life],
SurveyData.[Capital Cost], SurveyData.[Capital Comments]
FROM SurveyData
WHERE (((SurveyData.Site) Like [Enter Site] & "*"))
ORDER BY SurveyData.[Date of Survey], SurveyData.Site, SurveyData.Element;

Regards
Dylan Dawson
 
D

dd

This is good and I may use it on my main data input form, but the rpoblem is
that there are numerous records for each site.

The report is based on a query and I want to let the user pick a site (or
sites) from a listbox or combo on a form which will then output the required
records to the report.

I want to use this method rather than type in the site name, because some of
the site names are similar and the *&[Site]&* method will pick up all
similar names. If I remove the wildcards the user has to type in the full
name.

(This also gives me the idea of putting the "produce site report" button on
my data input form.)

Clear as Mud?
Regards
Dylan

Check this link on "Print only the current record to a report"

http://www.mvps.org/access/reports/rpt0002.htm
 
G

Guest

Mybe this link will be better for multi select

http://www.mvps.org/access/reports/rpt0005.htm

--
Good Luck
BS"D


dd said:
This is good and I may use it on my main data input form, but the rpoblem is
that there are numerous records for each site.

The report is based on a query and I want to let the user pick a site (or
sites) from a listbox or combo on a form which will then output the required
records to the report.

I want to use this method rather than type in the site name, because some of
the site names are similar and the *&[Site]&* method will pick up all
similar names. If I remove the wildcards the user has to type in the full
name.

(This also gives me the idea of putting the "produce site report" button on
my data input form.)

Clear as Mud?
Regards
Dylan

Check this link on "Print only the current record to a report"

http://www.mvps.org/access/reports/rpt0002.htm

--
Good Luck
BS"D


dd said:
I've got a report based on a query. The query asks the user for a SITE
location. It would be useful if I could create a form which lists the
sites
in a combo box so that the user can select a site rather than typing it
in.
Is there an easy way to do this?

SELECT SurveyData.[Date of Survey], SurveyData.Site, SurveyData.Element,
SurveyData.Condition, SurveyData.PriorityRef, SurveyData.[Revenue Cost],
SurveyData.[Revenue Comments], SurveyData.[Remaining Life],
SurveyData.[Capital Cost], SurveyData.[Capital Comments]
FROM SurveyData
WHERE (((SurveyData.Site) Like [Enter Site] & "*"))
ORDER BY SurveyData.[Date of Survey], SurveyData.Site, SurveyData.Element;

Regards
Dylan Dawson
 
D

dd

Ofer,

Can you tell me how to connect the form to this code?

--
Dylan Dawson

Mybe this link will be better for multi select

http://www.mvps.org/access/reports/rpt0005.htm

--
Good Luck
BS"D


dd said:
This is good and I may use it on my main data input form, but the rpoblem
is
that there are numerous records for each site.

The report is based on a query and I want to let the user pick a site (or
sites) from a listbox or combo on a form which will then output the
required
records to the report.

I want to use this method rather than type in the site name, because some
of
the site names are similar and the *&[Site]&* method will pick up all
similar names. If I remove the wildcards the user has to type in the full
name.

(This also gives me the idea of putting the "produce site report" button
on
my data input form.)

Regards
Dylan

Check this link on "Print only the current record to a report"

http://www.mvps.org/access/reports/rpt0002.htm

--
Good Luck
BS"D


dd said:
I've got a report based on a query. The query asks the user for a SITE
location. It would be useful if I could create a form which lists the
sites
in a combo box so that the user can select a site rather than typing it
in.
Is there an easy way to do this?

SELECT SurveyData.[Date of Survey], SurveyData.Site, SurveyData.Element,
SurveyData.Condition, SurveyData.PriorityRef, SurveyData.[Revenue Cost],
SurveyData.[Revenue Comments], SurveyData.[Remaining Life],
SurveyData.[Capital Cost], SurveyData.[Capital Comments]
FROM SurveyData
WHERE (((SurveyData.Site) Like [Enter Site] & "*"))
ORDER BY SurveyData.[Date of Survey], SurveyData.Site,
SurveyData.Element;

Regards
Dylan Dawson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top