views:

45

answers:

2

I'm not sure how to fix this issue, but when I utilize combo boxes on my form which selects data from multiple tables I'm not able to save any of the data selected.

I tried to use the Bound form utility but it only asked me to "Enter Parameter Value". I took out the "Bound" portion of the code and the combo box works fine.

I have a nice little save button, but it doesn't actually save anywhere.

I tried using a query, but that didn't fix it either unless, of course, I didn't do the query correctly.

Here is the "Row Source" information...

SELECT SubArea.SubAreaID, SubArea.SubAreaName, SubArea.ProductName FROM SubArea WHERE (((SubArea.ProductName)=Forms![Combo Form]!Product));

Do I need to put something in VBA or perhaps a Macro to have all the data selected to actually save into a table??? HELP!!!

Thanks

A: 

For the Bound Form

Open the form in design mode, right click on the combo box and go to properties. Check out if it is actually bound to something in the Control Source field.

Raj More
It would appear that nothing is in the Control Source field. Do I need to add something there like the Table I want the Data saved in or where the actual data is coming from?
Bill Sublette
The Control source field should contain the name of the field that you want the data to be saved in.
Raj More
Awesome thanks!
Bill Sublette
A: 

I'm skeptical whether you really need to store all those field values in another table. You can store just the SubArea primary key value (SubAreaID?) in the other table. Then whenever you need to display the other fields (SubAreaName and ProductName?) associated with the stored primary key, use a query with an INNER JOIN (on the primary key) between SomeOtherTable and SubArea.

HansUp
I am not quite sure that using a query is the best idea in that it seems to be avoiding the problem, rather than solving it, so it may bite at some other corner.
Remou
You're right, Remou. I discarded all but the last paragraph. I think that part may actually be helpful to him.
HansUp
I need to be able to save each selection made by the user (the one I showed is only 1 of 3 different combo boxes) and once each area has been selected I have to show how many hours were worked for those areas... I have 2 Project areas to select from and depending on which one was selected I then have a major area to select and from there each major area has specific sub areas to select. I then have to record the hours worked in those areas. Once all that is entered and the fields are populated I need to be able to save it in a different table so I may build reports for each area
Bill Sublette
Your table should include fields for each of the three areas and further fields for the various times. The form should be bound to this table, or better, a query. Each of the three area fields should be the control source for the look-up combos and the bound column for the look-up columns should be the field that holds the data that is to be inserted into the table (ideally an id). Saving data is the default in a properly set-up Access form.
Remou
That took care of it!
Bill Sublette