473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Combo Box on form based on a query

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
1 2158
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sean | last post by:
Greetings all, I am attempting to make a form that will filter through several tables that (I believe) have refretial integrity. I am pulling data from several tables into the form and i would...
7
by: Megan | last post by:
Hi everybody- I inherited a database that somehow uses a bound combo box as a record selector. Let me give you some background. The form is based on data from 2 tables. The first table, Person,...
8
by: Lyn | last post by:
Hi, Can anyone tell me how the initial value displayed in Combo Box is determined when a form is opened? I am loading the dropdown from one field ("CategoryName") of a table, with "ORDER BY ". ...
3
by: dmkeith2 | last post by:
I have a table for all my combox boxes. ID: AutoNumber ComboName: text ComboValue: text with no duplicates I have create a query based on this table. I have also created two forms based on...
3
by: hmiller | last post by:
Hey everyone, I am having a hell of a time trying to set this menu system up. Here's what I'm trying to do. Combo Box One; is populated by names under properties "row source" "Phase 1"...
1
by: Kevin | last post by:
I need some help figuring this one out. I'm sure I did something like it awhile back but I can seemed to find that database or remember how I did this. Any way, the database tables are...
4
by: banderson | last post by:
Hello amazing vba writers, I am trying to make a combo box return a value based on a combo box selection. I have tried a number of the codes posted here and am still having problems. I think it is...
4
by: whamo | last post by:
I have the need to populate a field based on the selection in a combo box. Starting out simple. (2) tables tbl_OSE_Info and tbl_Input; tbl_OSE_Info has three fields: Key, OSE_Name and OSE_Wt...
1
by: Chezza | last post by:
Hi All, Thanks to those that have helped me before. It’s been a couple of weeks since I posted (I can only play with this during my spare time at work) so here’s the set up again- we receive...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.