csroberson
Technical User
Please forgive me if this question is misplaced or malformed but this is my first foray into MS Access and SQL and I haven't done anything with relational databases since about 1985. OK, with that caveat out of the way, please allow me to ask my question:
I am working on a SQL query for a Row Source field of a Combo Box in Microsoft Access 2000. I want to show a drop down list of available values from a table called tblConfigurations:
{ConfigID, PlaceID, LocalConfigName, ...}
This is going into a table called tblEvents:
{EventID, Date, HostID, PlaceID, ConfigID, ...}
As I populate tblEvents, a date is entered, a Host is selected (from a list based on tblHosts) and a Place is the selected (from a list based on tblPlaces) and now I come to my issue.
I want to create a list of {ConfigID, LocalConfigName} but only if the PlaceID in tblConfigurations matches the PlaceID just selected for the previous field of the record being created. There is no reason to show Configs for other places -- there can be multiple configs for each place.
So far, I have the following select:
SELECT [tblConfigurations].[PlaceID], [tblConfigurations].[ConfigID], [tblConfigurations].[LocalConfigName] FROM tblConfigurations;
It seems I want to use a WHERE clause but I don't know how to reference the PlaceID field of the current record. I'm wondering if I'm thinking about this the wrong way.
I'm looking for suggestions, examples or web page references. Any help will be appreciated.
Thanks,
Chip
I am working on a SQL query for a Row Source field of a Combo Box in Microsoft Access 2000. I want to show a drop down list of available values from a table called tblConfigurations:
{ConfigID, PlaceID, LocalConfigName, ...}
This is going into a table called tblEvents:
{EventID, Date, HostID, PlaceID, ConfigID, ...}
As I populate tblEvents, a date is entered, a Host is selected (from a list based on tblHosts) and a Place is the selected (from a list based on tblPlaces) and now I come to my issue.
I want to create a list of {ConfigID, LocalConfigName} but only if the PlaceID in tblConfigurations matches the PlaceID just selected for the previous field of the record being created. There is no reason to show Configs for other places -- there can be multiple configs for each place.
So far, I have the following select:
SELECT [tblConfigurations].[PlaceID], [tblConfigurations].[ConfigID], [tblConfigurations].[LocalConfigName] FROM tblConfigurations;
It seems I want to use a WHERE clause but I don't know how to reference the PlaceID field of the current record. I'm wondering if I'm thinking about this the wrong way.
I'm looking for suggestions, examples or web page references. Any help will be appreciated.
Thanks,
Chip