Help with parameterised query

Ben2k

Board Regular
Joined
Oct 16, 2002
Messages
77
I have a query called DealsBetweenDates which accepts two parameters which are date from and date to.

I have a form with a drop down which contains a list of months from a table, 3 fields in this table are the month then the relvent start and and dates for that month i.e. July 1/7/04 31/7/04

I want my user to pick a month then have the start and end dates passed to the query as the parameters.

Then on the same form as the drop down I want the total of another column within the query.

Hope someone can help.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
For your first problem you should include, but hide the start and end dates in your dropdown and then pass them as parameters.

To do this set the RowSource property to a query containing all three fields, ColumnCount to 3 and the column widths for the start and end date to zero.

You can access the start and end date using the Column(x) property of the dropdown, where x is the column that the start/end date is in.

As for your second problem I'm not quite sure what you mean, could you explain further?
 
Upvote 0
Norie thanks for your help.

Its really hard to explain, would be easier to show you. My database is here

http://www.stevedurkinltd.com/finance.mdb

You can see in the SalesmansSummary form I have managed to get the actual values displayed by using =SUM([balance])

How can I get the budget values in though?, they come from a different table which isn't related to the table in the existing query.

I want to take the value of column(0) of combo2 and query the FinanceBudgetVolume table - how can I do all this just using the one query?

I'm getting confused you can probably gather this is my first project and i'm stuck! :oops:

Thanks again

Ben
 
Upvote 0
Ben2K

I downloaded your database a couple of days ago and took a short look at it.

I'm not sure you are going about things in the correct way, if you could maybe explain what your ultimate goal is.

BTW

There is a link between the tables - the Company field.
 
Upvote 0

Forum statistics

Threads
1,221,773
Messages
6,161,855
Members
451,724
Latest member
sledparty

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top