By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,008 Members | 2,962 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,008 IT Pros & Developers. It's quick & easy.

code to open list box from param query

P: n/a
Not an expert but have a paramater query that would like to open
as a list box on an existing form. I have a button which opens
the query from the form right now but would like to have it open
as a list box insted of the query. Seems like should be pretty
simple but not getting anywhere with it. If you need more info
let me know & will try to post it for you. Thanks
dc
Feb 15 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Wed, 15 Feb 2006 08:48:18 -0600, doncee wrote:
Not an expert but have a paramater query that would like to open
as a list box on an existing form. I have a button which opens
the query from the form right now but would like to have it open
as a list box insted of the query. Seems like should be pretty
simple but not getting anywhere with it. If you need more info
let me know & will try to post it for you. Thanks
dc


Set the ListBox Row Source Type property to Table/Query.
Set the ListBox Row Source to the query.
Set the column count to whatever number of columns are wanted.
Set the column widths to whatever is appropriate
Set the Bound Column to whatever is appropriate.

When the form opens, it will prompt for the parameter.
You can re-prompt for a new value while the form is open whenever you
refresh the form, or by code:

Me!ListBoxName.Requery
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 15 '06 #2

P: n/a
fredg <fg******@example.invalid> wrote in
news:y0*****************************@40tude.net:
On Wed, 15 Feb 2006 08:48:18 -0600, doncee wrote:
Not an expert but have a paramater query that would like
to open as a list box on an existing form. I have a button
which opens the query from the form right now but would
like to have it open as a list box insted of the query.
Seems like should be pretty simple but not getting
anywhere with it. If you need more info let me know & will
try to post it for you. Thanks dc


Set the ListBox Row Source Type property to Table/Query.
Set the ListBox Row Source to the query.
Set the column count to whatever number of columns are
wanted. Set the column widths to whatever is appropriate
Set the Bound Column to whatever is appropriate.

When the form opens, it will prompt for the parameter.
You can re-prompt for a new value while the form is open
whenever you refresh the form, or by code:

Me!ListBoxName.Requery


Thanks for the reply. I am actually setting the parameter
via a text box on the original form & therefore I am bypassing
the parameter prompt. The command button will open the query
directly from the criteria in the text box but will not open the
list box. I guess I am making some sort of circular
reference but somehow I think it should be do able. Any more
thoughts would be appreciated.
dc
Feb 15 '06 #3

P: n/a
fredg <fg******@example.invalid> wrote in
news:y0*****************************@40tude.net:
On Wed, 15 Feb 2006 08:48:18 -0600, doncee wrote:
Not an expert but have a paramater query that would like
to open as a list box on an existing form. I have a button
which opens the query from the form right now but would
like to have it open as a list box insted of the query.
Seems like should be pretty simple but not getting
anywhere with it. If you need more info let me know & will
try to post it for you. Thanks dc


Set the ListBox Row Source Type property to Table/Query.
Set the ListBox Row Source to the query.
Set the column count to whatever number of columns are
wanted. Set the column widths to whatever is appropriate
Set the Bound Column to whatever is appropriate.

When the form opens, it will prompt for the parameter.
You can re-prompt for a new value while the form is open
whenever you refresh the form, or by code:

Me!ListBoxName.Requery


Never mind my previous messge the Me!list box name.requery
command appears to have done the trick.....thank you very much
dc
Feb 15 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.