#  Other Applications & Softwares  > Access Tables & Databases >  >  Combobox Selections Not Saving To Table

## Mooseman60

Heres my problem

I have created two tables Table 1 Project Details and Table 2 Builders Details.

I have created 2 forms using the wizard selecting all fields in each table for each form
frmProjectDetails and frmBuildersDetails


I have changed one textbox to a combo box to Table 1 Projects Form to look up Builders name address etc from Table 2 Builders Details and insert into Table 1 Project Details.

Any data entered manually into the form saves to the table ok but the combo box selections do not save to the table.

Can anyone shed some light on why this happening as I have spent hours searching for a sloution

----------


## alansidman

Is anything appearing in your table where you expect the builder name to appear.  A number perhaps?  Or is the field for the record blank?  Have you double checked the properties for the control (combobox) and ensured that the Control Source in the properties indicates the field in your table correctly?

In the properties for the combo box, on the data tab, what is the bound column?  Lastly, can you provide the SQL statement for the row source from the data tab in the properties.

Alan

----------


## Mooseman60

Ok I have tried everything

This is what I have

tblProjectsDetails                                             frmNewProjectsDetails                                             
ProjectID                                                               
ProjectNo                                                             ProjectNo                                                   
ProjectName                                                        ProjectName
QuotedAmount                                                     QuotedAmount
OrderNo                                                               OrderNo
QuotedLabourAmount                                            QuotedLabourAmount
QuotedMaterialsAmount 
                                       QuotedMaterialsAmount          
CompanyName                                                     CompanyName
CompanyAddress                                                  CompanyAddress  
CompanySuburb                                                   CompanySurburb
CompanyPostcode                                               CompanyPostcode
CompanyContact                                                  CompanyContact
CompanyTel                                                         CompanyTel
CompanyFax                                                        CompanyFax
CompanyEmail                                                     CompanyEmail

tblCompanyDetails                                           frmNewCompanyDetails
CompanyNameID                                                                     
CompanyName                                                    CompanyName    (cboCompanyName)
CompanyAddress                                                CompanyAddress
CompanySuburb                                                  CompanySuburb
CompanyPostcode                                              CompanyPostcode
CompanyContact                                                CompanyContact
CompanyTel                                                       CompanyTel
CompanyFax                                                      CompanyFax
CompanyEmail  
CompanyEmail

New Project Form Properties                            

Name: cboCompanyName                                     CompanyName
Control Source:CompanyName                              CompanyName
Row Source Type: Table/Query
Row Scource: tblCompanyDetails
ColumnCount: 8
Column Heads: No
Column Width: 0cm,4.05cm
Bound Column: 0
List Row: 8

Record Scource = SELECT tblCompanyDetails.CompanyName, tblCompanyDetails.Address, tblCompanyDetails.Suburb, tblCompanyDetails.Postcode, tblCompanyDetails.Postcode, tblCompanyDetails.ContactPerson, tblCompanyDetails.TelephoneNo, tblCompanyDetails.FaxNo, tblCompanyDetails.EmailAddress FROM tblCompanyDetails; 

The frmProjectDetails save to the tblProjectDetails (ProjectNo, ProjectName, QuotedAmount, QuotedLabourAmount, QuotedMaterialsAmount, QuotedProfit are all ok) and the frmCompanyDetails ave to the tblCompanyDetails

----------


## Mooseman60

Just adding to the last post as it sent before I was finished

To summarize the frmCompanyDetails saves all the data to tblCompanyDetails ok.

The frmProjectDetails saves all the project details but not the company details to the tblProjectDetails

----------


## alansidman

It appears that in your Combo Box that you don't have a bound column in the properties.  Suggest you change the zero to a one.  

Additionally, why are you using don't you have the CompanyID in your lookup query.  It is more efficient in a db to have the information as a numeric value and if you need the information in a query or report to display the company name to link the project table to the Company Name table using a primary key and foreign key.  However, your method will still work.


Alan

----------

