i can't select anything in my combo box. . .

L

lindsay

ok. i'm completly stumped. in my access form(design view), i used the wizard
to create a combo box that would list various cities that one can choose from
(location table). i selected the third option for the combo box, so that the
combo box selection will "find a record on the form based on teh value i
selected in my combo box".

depending on the selection i make, i want my subform (which is based on a
different table, task ID table) to show the various task ID's for that
specific location.

so i have three different situations that occur depending on the control
source of the combo box.

1) the control source is the location's ID number (which is an auto number
assigned to locations when they are entered into the data). this results in
the form being as close to what i want as possible. when i click the right
arrow button of the city records (in order to view other city's task ID's),
the city in teh combo box changes accordingly, as do the task ID's for that
city. HOWEVER, i cannot select anything in the actual combo box (i get that
quirky "error" sound, but no actual error pop-up box. in the status bar at
the bottom of Access, it says "control can't be edited, it's bound to
autonumber by 'location ID'". but other than that, everything works fine.

2) control source is set to the location's actual name (i.e. denver, paris,
etc.). i now can select the city from the combo box and it's appropriate
id's for that city show up, but i get numerous errors in trying to do so
(random errors such as compile errors). however, it changes the name of the
city in both the combo box AND the original location table to a randomly
generated number.

3) the control source is unbounded (i.e. there is nothing in the control
source text box). i can select the city and the appropriate task ID's come up
for that city, however if i use the bottom right arrow buttons to "scroll"
through the city records, it changes the ID's, not the city. therefore, when
i enter in a new id for a city, it doesn't always get associated with the
right city (or in most cases, it's assigned to a "0" city, which doesn't
actually exist).

overall, option 1 brings me closest to what i want, to be able to select a
city from a dropdown menu (combo box) and have the subform reflect the
accurate task id's for that city, as well as being able to scroll through the
cities (the records) via the little arrow buttons at the bottom of the form.

i'm tried using VB code and such, but i keep getting runtime errors for the
following code: (combo box name is "please select a city")
Private Sub Please_Select_a_City_AfterUpdate()

temp = "SELECT [Local TKST ID's and Descriptions].[Local TKST IDs],
[Local TKST ID's and Descriptions].Description, [Local TKST ID's and
Descriptions].[Location ID] FROM [Local TKST ID's and Descriptions]" + "WHERE
[Local TKST ID's and Descriptions].[Location ID] =" +
Please_Select_a_City.Location_ID
Form.limited_Local_TKST.RecordSource = temp
Form.limited_Local_TKST.Refresh

End Sub

i wanted to try to create a query that would match the task id's of the city
with the city that i select from the combo box. it hasn't worked, primarily
because i simply can't actually select anything from teh menu.


i'm terribly sorry this is such a long question, i've gone through all of
the forums looking for an answer and haven't been able to find one =\

please help!!
 
B

BruceM

What do you mean "depending on the control source of the combo box"? A
control has just one source, although perhaps you could change that through
code, but I couldn't begin to address that even if it is possible. If you
select "Bangor" you should be able to see all records that have "Bangor" in a
particular field. If you find three such records, and if yoru main table is
related to your tasks table, then for each of the three record you would be
able to see related tasks in the subform. It may help if I point out that
combo boxes have bound and unbound columns. If the row source query consists
of CityID and CityName in that order, and if CityID is the bound column
(which you can see on the Data tab of the combo box property sheet), your
column count (the Format tab on the property sheet) needs to be 2. If the
Column Widths are 0";1" then the second column will be visible, even if the
first column is the one the database is storing.

lindsay said:
ok. i'm completly stumped. in my access form(design view), i used the wizard
to create a combo box that would list various cities that one can choose from
(location table). i selected the third option for the combo box, so that the
combo box selection will "find a record on the form based on teh value i
selected in my combo box".

depending on the selection i make, i want my subform (which is based on a
different table, task ID table) to show the various task ID's for that
specific location.

so i have three different situations that occur depending on the control
source of the combo box.

1) the control source is the location's ID number (which is an auto number
assigned to locations when they are entered into the data). this results in
the form being as close to what i want as possible. when i click the right
arrow button of the city records (in order to view other city's task ID's),
the city in teh combo box changes accordingly, as do the task ID's for that
city. HOWEVER, i cannot select anything in the actual combo box (i get that
quirky "error" sound, but no actual error pop-up box. in the status bar at
the bottom of Access, it says "control can't be edited, it's bound to
autonumber by 'location ID'". but other than that, everything works fine.

2) control source is set to the location's actual name (i.e. denver, paris,
etc.). i now can select the city from the combo box and it's appropriate
id's for that city show up, but i get numerous errors in trying to do so
(random errors such as compile errors). however, it changes the name of the
city in both the combo box AND the original location table to a randomly
generated number.

3) the control source is unbounded (i.e. there is nothing in the control
source text box). i can select the city and the appropriate task ID's come up
for that city, however if i use the bottom right arrow buttons to "scroll"
through the city records, it changes the ID's, not the city. therefore, when
i enter in a new id for a city, it doesn't always get associated with the
right city (or in most cases, it's assigned to a "0" city, which doesn't
actually exist).

overall, option 1 brings me closest to what i want, to be able to select a
city from a dropdown menu (combo box) and have the subform reflect the
accurate task id's for that city, as well as being able to scroll through the
cities (the records) via the little arrow buttons at the bottom of the form.

i'm tried using VB code and such, but i keep getting runtime errors for the
following code: (combo box name is "please select a city")
Private Sub Please_Select_a_City_AfterUpdate()

temp = "SELECT [Local TKST ID's and Descriptions].[Local TKST IDs],
[Local TKST ID's and Descriptions].Description, [Local TKST ID's and
Descriptions].[Location ID] FROM [Local TKST ID's and Descriptions]" + "WHERE
[Local TKST ID's and Descriptions].[Location ID] =" +
Please_Select_a_City.Location_ID
Form.limited_Local_TKST.RecordSource = temp
Form.limited_Local_TKST.Refresh

End Sub

i wanted to try to create a query that would match the task id's of the city
with the city that i select from the combo box. it hasn't worked, primarily
because i simply can't actually select anything from teh menu.


i'm terribly sorry this is such a long question, i've gone through all of
the forums looking for an answer and haven't been able to find one =\

please help!!
 
L

lindsay

The control source box allows me to choose from three options, the three i
listed below (location, location ID, and unbounded). they are all references
from the same table, "Locations and Location ID's". the different problems
that have come up are due ot the choice of entry in the control source box
that the properties box allows me to choose from.

I'm terribly sorry, but i couldn't really understand what the rest of your
response meant. i'm quite new to access (i've been working with it for two
weeks!), and am quite confused =\


BruceM said:
What do you mean "depending on the control source of the combo box"? A
control has just one source, although perhaps you could change that through
code, but I couldn't begin to address that even if it is possible. If you
select "Bangor" you should be able to see all records that have "Bangor" in a
particular field. If you find three such records, and if yoru main table is
related to your tasks table, then for each of the three record you would be
able to see related tasks in the subform. It may help if I point out that
combo boxes have bound and unbound columns. If the row source query consists
of CityID and CityName in that order, and if CityID is the bound column
(which you can see on the Data tab of the combo box property sheet), your
column count (the Format tab on the property sheet) needs to be 2. If the
Column Widths are 0";1" then the second column will be visible, even if the
first column is the one the database is storing.

lindsay said:
ok. i'm completly stumped. in my access form(design view), i used the wizard
to create a combo box that would list various cities that one can choose from
(location table). i selected the third option for the combo box, so that the
combo box selection will "find a record on the form based on teh value i
selected in my combo box".

depending on the selection i make, i want my subform (which is based on a
different table, task ID table) to show the various task ID's for that
specific location.

so i have three different situations that occur depending on the control
source of the combo box.

1) the control source is the location's ID number (which is an auto number
assigned to locations when they are entered into the data). this results in
the form being as close to what i want as possible. when i click the right
arrow button of the city records (in order to view other city's task ID's),
the city in teh combo box changes accordingly, as do the task ID's for that
city. HOWEVER, i cannot select anything in the actual combo box (i get that
quirky "error" sound, but no actual error pop-up box. in the status bar at
the bottom of Access, it says "control can't be edited, it's bound to
autonumber by 'location ID'". but other than that, everything works fine.

2) control source is set to the location's actual name (i.e. denver, paris,
etc.). i now can select the city from the combo box and it's appropriate
id's for that city show up, but i get numerous errors in trying to do so
(random errors such as compile errors). however, it changes the name of the
city in both the combo box AND the original location table to a randomly
generated number.

3) the control source is unbounded (i.e. there is nothing in the control
source text box). i can select the city and the appropriate task ID's come up
for that city, however if i use the bottom right arrow buttons to "scroll"
through the city records, it changes the ID's, not the city. therefore, when
i enter in a new id for a city, it doesn't always get associated with the
right city (or in most cases, it's assigned to a "0" city, which doesn't
actually exist).

overall, option 1 brings me closest to what i want, to be able to select a
city from a dropdown menu (combo box) and have the subform reflect the
accurate task id's for that city, as well as being able to scroll through the
cities (the records) via the little arrow buttons at the bottom of the form.

i'm tried using VB code and such, but i keep getting runtime errors for the
following code: (combo box name is "please select a city")
Private Sub Please_Select_a_City_AfterUpdate()

temp = "SELECT [Local TKST ID's and Descriptions].[Local TKST IDs],
[Local TKST ID's and Descriptions].Description, [Local TKST ID's and
Descriptions].[Location ID] FROM [Local TKST ID's and Descriptions]" + "WHERE
[Local TKST ID's and Descriptions].[Location ID] =" +
Please_Select_a_City.Location_ID
Form.limited_Local_TKST.RecordSource = temp
Form.limited_Local_TKST.Refresh

End Sub

i wanted to try to create a query that would match the task id's of the city
with the city that i select from the combo box. it hasn't worked, primarily
because i simply can't actually select anything from teh menu.


i'm terribly sorry this is such a long question, i've gone through all of
the forums looking for an answer and haven't been able to find one =\

please help!!
 
B

BruceM

Databases start with tables. If you have a table you can make a form that is
related to information you want to store. Once you have a table, create a
form in design view. Click View > Properties. In Record Source (on the Data
tab) click the down arrow and select your table. You should see a list of
table fields appear elsewhere on the screen. If not, click View > Field
List. Drag one of the fields to the form. Now click what you have created
on the form, and click View > Properties. On the Data tab you will see a
Control Source listed. It will be the field from the table. What you added
when you dragged the field onto the form was a text box. A text box is a
type of Control, which is just the name Access uses for anything you add to a
form. It includes text boxes, combo boxes, check boxes, labels, buttons,
lines, boxes, and so forth. Some controls (such as text boxes) function sort
of as portals to the underlying table. If you add information to a bound
text box (a bound control has a control source, or to put it another way, is
bound to an field in the table to which the form is bound. The form is bound
to a table; some of the controls are bound to fields in the table.
If you are familiar with Excel but new to Access you may be struggling. The
two look similar in some ways, but are very different. Why don't you
describe (in broad brush strokes) what you are trying to do with this
project. We may need to back up a bit.


lindsay said:
The control source box allows me to choose from three options, the three i
listed below (location, location ID, and unbounded). they are all references
from the same table, "Locations and Location ID's". the different problems
that have come up are due ot the choice of entry in the control source box
that the properties box allows me to choose from.

I'm terribly sorry, but i couldn't really understand what the rest of your
response meant. i'm quite new to access (i've been working with it for two
weeks!), and am quite confused =\


BruceM said:
What do you mean "depending on the control source of the combo box"? A
control has just one source, although perhaps you could change that through
code, but I couldn't begin to address that even if it is possible. If you
select "Bangor" you should be able to see all records that have "Bangor" in a
particular field. If you find three such records, and if yoru main table is
related to your tasks table, then for each of the three record you would be
able to see related tasks in the subform. It may help if I point out that
combo boxes have bound and unbound columns. If the row source query consists
of CityID and CityName in that order, and if CityID is the bound column
(which you can see on the Data tab of the combo box property sheet), your
column count (the Format tab on the property sheet) needs to be 2. If the
Column Widths are 0";1" then the second column will be visible, even if the
first column is the one the database is storing.

lindsay said:
ok. i'm completly stumped. in my access form(design view), i used the wizard
to create a combo box that would list various cities that one can choose from
(location table). i selected the third option for the combo box, so that the
combo box selection will "find a record on the form based on teh value i
selected in my combo box".

depending on the selection i make, i want my subform (which is based on a
different table, task ID table) to show the various task ID's for that
specific location.

so i have three different situations that occur depending on the control
source of the combo box.

1) the control source is the location's ID number (which is an auto number
assigned to locations when they are entered into the data). this results in
the form being as close to what i want as possible. when i click the right
arrow button of the city records (in order to view other city's task ID's),
the city in teh combo box changes accordingly, as do the task ID's for that
city. HOWEVER, i cannot select anything in the actual combo box (i get that
quirky "error" sound, but no actual error pop-up box. in the status bar at
the bottom of Access, it says "control can't be edited, it's bound to
autonumber by 'location ID'". but other than that, everything works fine.

2) control source is set to the location's actual name (i.e. denver, paris,
etc.). i now can select the city from the combo box and it's appropriate
id's for that city show up, but i get numerous errors in trying to do so
(random errors such as compile errors). however, it changes the name of the
city in both the combo box AND the original location table to a randomly
generated number.

3) the control source is unbounded (i.e. there is nothing in the control
source text box). i can select the city and the appropriate task ID's come up
for that city, however if i use the bottom right arrow buttons to "scroll"
through the city records, it changes the ID's, not the city. therefore, when
i enter in a new id for a city, it doesn't always get associated with the
right city (or in most cases, it's assigned to a "0" city, which doesn't
actually exist).

overall, option 1 brings me closest to what i want, to be able to select a
city from a dropdown menu (combo box) and have the subform reflect the
accurate task id's for that city, as well as being able to scroll through the
cities (the records) via the little arrow buttons at the bottom of the form.

i'm tried using VB code and such, but i keep getting runtime errors for the
following code: (combo box name is "please select a city")
Private Sub Please_Select_a_City_AfterUpdate()

temp = "SELECT [Local TKST ID's and Descriptions].[Local TKST IDs],
[Local TKST ID's and Descriptions].Description, [Local TKST ID's and
Descriptions].[Location ID] FROM [Local TKST ID's and Descriptions]" + "WHERE
[Local TKST ID's and Descriptions].[Location ID] =" +
Please_Select_a_City.Location_ID
Form.limited_Local_TKST.RecordSource = temp
Form.limited_Local_TKST.Refresh

End Sub

i wanted to try to create a query that would match the task id's of the city
with the city that i select from the combo box. it hasn't worked, primarily
because i simply can't actually select anything from teh menu.


i'm terribly sorry this is such a long question, i've gone through all of
the forums looking for an answer and haven't been able to find one =\

please help!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top