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

Combo Box on form based on a query

P: n/a
I would like to have a combo box on a form that shows the results of a
query, however the query is variable and i am unsure how to do this. I
have NO knowledge of code so very basc instructions would be
appreciated!

I have a table "appointments" which contains an "appointment date"
field.
I have a form "planning" (based on another table) with a field for
"date to plan".
I would like a combo box to show any "appointments" already made for
the "date to plan"

Obviously i can't have a query for every date - so whch direction
should i be looking in to do this?

Thanks

Dec 1 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Keri:

Take a look at Microsoft's Knowledge Base and search for KB97624 for
step by step instructions. http://support.microsoft.com/kb/97624/en-us
I recommend trying it first using the Northwind database as they
describe, so you know all of the steps involved. Once that's working
properly, then give it a shot with your database.

Although this example is for synchronizing two combo boxes, you're
going to base step 2's query in your database with a query based on the
appointments table and replace:
Forms![frmCategoriesProducts]![Categories] in the example with
Forms![planning]![date to plan]
Name your query Appointment Dates

In step 3, the setup for Combo Box 1 will be replaced with these
instructions:
Name: date to plan
After Update: Refresh Appointments
Format: Short Date

Combo Box 2 will be like this:
Name: appointments
RowSource: Appointment Dates
ColumnCount: 2
ColumnWidth: 0;1
BoundColumn: 1

In step 4, save your macro as Refresh Appointments instead of Refresh
Products, then make the Control Name argument appointments instead of
Products.

That should do it!

Hope that helps,
Jana

keri wrote:
I would like to have a combo box on a form that shows the results of a
query, however the query is variable and i am unsure how to do this. I
have NO knowledge of code so very basc instructions would be
appreciated!

I have a table "appointments" which contains an "appointment date"
field.
I have a form "planning" (based on another table) with a field for
"date to plan".
I would like a combo box to show any "appointments" already made for
the "date to plan"

Obviously i can't have a query for every date - so whch direction
should i be looking in to do this?

Thanks
Dec 1 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.