Re: drop down list within a query?
- From: Maax <Maax@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 20 Jan 2007 11:30:01 -0800
Hi Fred, i am getting closer to getting this to work I think (when i say I, I
mean us of course).
I have done as suggested and i now get this message "The command or action
'ApplyFilterSort' isn't available now."
when i click ok the report opens up but the filter has obviously not been
applied.
any thoughts ?
Many thanks for all your help this far.
"fredg" wrote:
On Sat, 20 Jan 2007 06:04:00 -0800, Maax wrote:.
Hi Fred, i am afraid i am not having any luck with this.
Firstly when i set the column width it reverts back to 0cm;2.54cm. I am not
sure if this is the same (2.54cm being 1 inch?)
Where I live (the U.S.) the width of the column is set in inches.
If you have a 2 column combo box, setting the Column Widths property
to 0";1" will result in hiding the first column and setting the 2nd
column to 1 inch.
You'll have to write whatever values work for you using whatever
measurement system is in your computers default settings.
cm is fine, just make the value large enough to fully show the
customer name.
The above assumes, of course, that your combo box has 2 columns.
Note: if you still have a problem creating the combo box, start all
over. This time use the Combo Box Wizard to create it. Answer it's
questions and it will do all the work for you.
Next when i add the code "me.visible = false" i get an error message,
regarding no such macro as "me"
I suspect you wrote Me.Visible = False directly on the Command Button
Click line.
That's not where it goes.
Display the combo box property ***.
Click on the Event tab.
On the Click event line write:
[Event Procedure]
Then click on the little button with 3 dots that appears on that line.
When the code window opens the cursor will be flashing between 2
already existing lines of code.
Between those 2 lines, write:
Me.Visible = False
Close the code window.
Try it now.
"fredg" wrote:
On Tue, 16 Jan 2007 12:40:01 -0800, Maax wrote:
Hi Fred, yes the query will be used for a report. Although your instructions
are clear I am having trouble with this. I will carry on trying though as i
am sure i will get it correct through trial and error.
"fredg" wrote:
*** Snipped ***
You'll need to use a form to do this.
Let's assume it is a CustomerID number you need as criteria.
Make a new unbound form.
Add a combo box that will include the CustomerID field as well as the
CustomerName field.
Make sure the Combo Box Bound Column is the
CustomerID field (the first column)
Set the Column Width property of the combo to
0";1"
Add a command button to the form.
Code the button's Click event:
Me.Visible = False
Name this form "ParamForm"
Code the Report's Record Source Query's CustomerID field criteria
line:
forms!ParamForm!ComboBoxName
Code the Report's Open Event:
DoCmd.OpenForm "ParamForm" , , , , , acDialog
Code the Report's Close event:
DoCmd.Close acForm, "ParamForm"
Run the Report.
The report will open the form.
Find the CustomerName in the combo box.
Click the command button.
The report will display just those records for the Customer selected.
When the Report closes it will close the form.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
- Follow-Ups:
- Re: drop down list within a query?
- From: fredg
- Re: drop down list within a query?
- References:
- Re: drop down list within a query?
- From: fredg
- Re: drop down list within a query?
- From: fredg
- Re: drop down list within a query?
- From: fredg
- Re: drop down list within a query?
- From: Maax
- Re: drop down list within a query?
- From: fredg
- Re: drop down list within a query?
- Prev by Date: Re: how to create a function w/in a query?
- Next by Date: Re: Controlling Query Output with Checkbox on Form
- Previous by thread: Re: drop down list within a query?
- Next by thread: Re: drop down list within a query?
- Index(es):