Combo Boxes and Forms

J

Jacques Steinman

I hope someone can help me, I am about to go insane with frustration!

I am trying to create a form that contains a combo box linked to a table.
Upon selecting an item from the box it should show the relating data in the
form fields. But it just isn't happening. I have followed and tried all the
sugestions in this forum, to no avail. The box list drops but I cant select
anything.
I know this is a tired topic, but can someone tell me what I could be doing
wrong?

Second question;

I have a table with a whole bunch of product data on it (CODE, DESCRIPTION,
SUPPLIER, COST etc). The products are used in electrical transmission line
construction. The construction of transmission lines are grouped into
Structures, consisting of a list of items with various quantities of each
item.

What I need to do is create a record of these different structures (called
DDT's), by sourcing the data from the common product data table and then give
the set of items a structure name (DDT1, for example).
So, I would need a form that I can select and input data from the product
table and then designate a name for the new data group.

Any ideas how I should strart?

I'm very much a noob as I've only discovered the brilliance of Access this
weekend.
 
J

John W. Vinson/MVP

On Sun, 27 Jul 2008 14:52:22 -0700, Jacques Steinman <Jacques
I hope someone can help me, I am about to go insane with frustration!

I am trying to create a form that contains a combo box linked to a table.
Upon selecting an item from the box it should show the relating data in the
form fields. But it just isn't happening. I have followed and tried all the
sugestions in this forum, to no avail. The box list drops but I cant select
anything.
I know this is a tired topic, but can someone tell me what I could be doing
wrong?

Not unless you tell us what you *are* doing, no. What are the
following properties of the combo?
- RowSource (post the SQL if it's a query)
- Control Source
- Bound Column
- any code linked to the combo (e.g. AfterUpdate event)
- The Recordsource for the form (post the SQL if it's a query)

Is the form updateable otherwise? Are you trying to use the combo to
navigate to a record or to copy data from one table to fill in another
table (if so: don't!!!)?
Second question;

I have a table with a whole bunch of product data on it (CODE, DESCRIPTION,
SUPPLIER, COST etc). The products are used in electrical transmission line
construction. The construction of transmission lines are grouped into
Structures, consisting of a list of items with various quantities of each
item.

What I need to do is create a record of these different structures (called
DDT's), by sourcing the data from the common product data table and then give
the set of items a structure name (DDT1, for example).
So, I would need a form that I can select and input data from the product
table and then designate a name for the new data group.

Any ideas how I should strart?

You'll probably need three tables: a table of Products; a table of
DDTs (with the DDTName as its primary key, perhaps); and a third table
indicating which products belong to which DDT. This table should have
fields for the unique productID and for the unique DDTName but
probably not much more.
 
G

Golfinray

The normal method is to use the combo as you have done. You should always, if
possible, allow the combo wizard to select the field from the table for you,
that way you know for sure it is there. Then right click on the combo to get
properties, go to events, click on afterupdate and start the code builder
(the little button out to the right.) Type:
Me.filter = "[yourtablefield] = """ & me.combo# & """"
Me.filteron = true
The combo number will be listed, like combo8 or combo22.
 
J

Jacques Steinman

Thanks for the replies guys. This is what the applicable combo box looks like:
(I haven't yet added golfinray's suggestion to the code.)

Private Sub Combo15_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Risc ID] = '" & Me![Combo15] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

But now. whenever I launch the form from the list to the left, the combo
works. Yet when launching the form from the switchboard, it doesn't work as
expected.

What could be causing that?

Golfinray said:
The normal method is to use the combo as you have done. You should always, if
possible, allow the combo wizard to select the field from the table for you,
that way you know for sure it is there. Then right click on the combo to get
properties, go to events, click on afterupdate and start the code builder
(the little button out to the right.) Type:
Me.filter = "[yourtablefield] = """ & me.combo# & """"
Me.filteron = true
The combo number will be listed, like combo8 or combo22.


Jacques Steinman said:
I hope someone can help me, I am about to go insane with frustration!

I am trying to create a form that contains a combo box linked to a table.
Upon selecting an item from the box it should show the relating data in the
form fields. But it just isn't happening. I have followed and tried all the
sugestions in this forum, to no avail. The box list drops but I cant select
anything.
I know this is a tired topic, but can someone tell me what I could be doing
wrong?

Second question;

I have a table with a whole bunch of product data on it (CODE, DESCRIPTION,
SUPPLIER, COST etc). The products are used in electrical transmission line
construction. The construction of transmission lines are grouped into
Structures, consisting of a list of items with various quantities of each
item.

What I need to do is create a record of these different structures (called
DDT's), by sourcing the data from the common product data table and then give
the set of items a structure name (DDT1, for example).
So, I would need a form that I can select and input data from the product
table and then designate a name for the new data group.

Any ideas how I should strart?

I'm very much a noob as I've only discovered the brilliance of Access this
weekend.
 
J

Jacques Steinman

I feel Like an idiot. I found the reason the box woulldn't select; the macro
was set as "read only". I changed it to "edit" and now it works fine.

Thanks again for the replies so far.

I'm still left struggling with the form in which the new DDT'S need to be
created from existing database lists.
As some of these structures have 40+ items, I thought it best to have one
combo box or list box with selectable items (via checkbox) drawn from the
data table.
Then a field to type the new DDT name on the same form and also a button to
save the new combination record.
I'd prefer the new DDT record to be saved in a new (list) form. I've seen it
done more or less like that with the Northwind sample with it's products

Jacques Steinman said:
Thanks for the replies guys. This is what the applicable combo box looks like:
(I haven't yet added golfinray's suggestion to the code.)

Private Sub Combo15_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Risc ID] = '" & Me![Combo15] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

But now. whenever I launch the form from the list to the left, the combo
works. Yet when launching the form from the switchboard, it doesn't work as
expected.

What could be causing that?

Golfinray said:
The normal method is to use the combo as you have done. You should always, if
possible, allow the combo wizard to select the field from the table for you,
that way you know for sure it is there. Then right click on the combo to get
properties, go to events, click on afterupdate and start the code builder
(the little button out to the right.) Type:
Me.filter = "[yourtablefield] = """ & me.combo# & """"
Me.filteron = true
The combo number will be listed, like combo8 or combo22.


Jacques Steinman said:
I hope someone can help me, I am about to go insane with frustration!

I am trying to create a form that contains a combo box linked to a table.
Upon selecting an item from the box it should show the relating data in the
form fields. But it just isn't happening. I have followed and tried all the
sugestions in this forum, to no avail. The box list drops but I cant select
anything.
I know this is a tired topic, but can someone tell me what I could be doing
wrong?

Second question;

I have a table with a whole bunch of product data on it (CODE, DESCRIPTION,
SUPPLIER, COST etc). The products are used in electrical transmission line
construction. The construction of transmission lines are grouped into
Structures, consisting of a list of items with various quantities of each
item.

What I need to do is create a record of these different structures (called
DDT's), by sourcing the data from the common product data table and then give
the set of items a structure name (DDT1, for example).
So, I would need a form that I can select and input data from the product
table and then designate a name for the new data group.

Any ideas how I should strart?

I'm very much a noob as I've only discovered the brilliance of Access this
weekend.
 
J

Jacques Steinman

Please Help:

I've got a master/detail form set up with queries linking it to master and
detail tables. I will use this to link the new DDT Codes with the data from
the product list table.
This is the system I need, but something isn't working right. Again, I have
a combo box problem; The combo box in the query (query name: Detail Query)
lists the items from the product list table, but in the form created (labled
Detail Form) based on the query it does not. I can, instead, type in anything
I want. But default values set in the query for that particular field shows
up on the form.

What am I doing wrong?



Jacques Steinman said:
I feel Like an idiot. I found the reason the box woulldn't select; the macro
was set as "read only". I changed it to "edit" and now it works fine.

Thanks again for the replies so far.

I'm still left struggling with the form in which the new DDT'S need to be
created from existing database lists.
As some of these structures have 40+ items, I thought it best to have one
combo box or list box with selectable items (via checkbox) drawn from the
data table.
Then a field to type the new DDT name on the same form and also a button to
save the new combination record.
I'd prefer the new DDT record to be saved in a new (list) form. I've seen it
done more or less like that with the Northwind sample with it's products

Jacques Steinman said:
Thanks for the replies guys. This is what the applicable combo box looks like:
(I haven't yet added golfinray's suggestion to the code.)

Private Sub Combo15_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Risc ID] = '" & Me![Combo15] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

But now. whenever I launch the form from the list to the left, the combo
works. Yet when launching the form from the switchboard, it doesn't work as
expected.

What could be causing that?

Golfinray said:
The normal method is to use the combo as you have done. You should always, if
possible, allow the combo wizard to select the field from the table for you,
that way you know for sure it is there. Then right click on the combo to get
properties, go to events, click on afterupdate and start the code builder
(the little button out to the right.) Type:
Me.filter = "[yourtablefield] = """ & me.combo# & """"
Me.filteron = true
The combo number will be listed, like combo8 or combo22.


:

I hope someone can help me, I am about to go insane with frustration!

I am trying to create a form that contains a combo box linked to a table.
Upon selecting an item from the box it should show the relating data in the
form fields. But it just isn't happening. I have followed and tried all the
sugestions in this forum, to no avail. The box list drops but I cant select
anything.
I know this is a tired topic, but can someone tell me what I could be doing
wrong?

Second question;

I have a table with a whole bunch of product data on it (CODE, DESCRIPTION,
SUPPLIER, COST etc). The products are used in electrical transmission line
construction. The construction of transmission lines are grouped into
Structures, consisting of a list of items with various quantities of each
item.

What I need to do is create a record of these different structures (called
DDT's), by sourcing the data from the common product data table and then give
the set of items a structure name (DDT1, for example).
So, I would need a form that I can select and input data from the product
table and then designate a name for the new data group.

Any ideas how I should strart?

I'm very much a noob as I've only discovered the brilliance of Access this
weekend.
 

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

Similar Threads

Forms - Combo Boxes 3
Forms & Tables with Combo Boxes 4
Multi Value Combo Boxes 4
synchronize combo boxes 1
synchronize combo boxes 7
Combo Boxes 1
Combo boxes and check boxes 3
Combo Boxes/Queries 1

Top