Form Entry Problems

  • Thread starter Thread starter sofiac
  • Start date Start date
S

sofiac

I have a form [frmContractMain] which data source is a query
[qryContractMain_Active]. This form can allow users to edit fields, but not
add a new record. One of the fields on the form is a combo boxe
[cmboCompanyName].

Now, when someone edits a combo box on a record, the form displays the
appropriate information, but the query displays the field as the ID# and not
the Company Name. I am having the same problem with all the other combo boxes
on the form.

Please help!
 
you have 2 issues:

1. If you cannot add or edit, chances are that the RecordSource of the
form is based on multiple tables. It is best to based each form or
subform on just one table.

2. to show second column of combo to the user but store data from the
first (hidden) column:

RowSource:
SELECT IDfieldname, TextToShow
FROM Tablename
ORDER BY TextToShow

ControlSource --> IDfieldname from form RecordSource
ColumnCount --> 2
columnWidths --> 0;2
ListWidth --> 2.2 (sum of Column widths + 0.2" for scrollbar)

the trick is the first column being zero in the column widths property
of the combo. For more information, read the Combobox Example in this
document:

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

and post back with more questions if you need to ;)


Warm Regards,
Crystal
remote programming and training

*
(: have an awesome day :)
*
 
Hi sofiac,
this is the standard way that combos work.
For a query to show the company name, add the company table and add the
company name field to the query

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
I do have all the elements you stated in #2, but I think my problem is #1. I
will probably have to alter my form source to just one table as you
recommended.

Thanks for your help!

strive4peace said:
you have 2 issues:

1. If you cannot add or edit, chances are that the RecordSource of the
form is based on multiple tables. It is best to based each form or
subform on just one table.

2. to show second column of combo to the user but store data from the
first (hidden) column:

RowSource:
SELECT IDfieldname, TextToShow
FROM Tablename
ORDER BY TextToShow

ControlSource --> IDfieldname from form RecordSource
ColumnCount --> 2
columnWidths --> 0;2
ListWidth --> 2.2 (sum of Column widths + 0.2" for scrollbar)

the trick is the first column being zero in the column widths property
of the combo. For more information, read the Combobox Example in this
document:

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

and post back with more questions if you need to ;)


Warm Regards,
Crystal
remote programming and training

*
(: have an awesome day :)
*



I have a form [frmContractMain] which data source is a query
[qryContractMain_Active]. This form can allow users to edit fields, but not
add a new record. One of the fields on the form is a combo boxe
[cmboCompanyName].

Now, when someone edits a combo box on a record, the form displays the
appropriate information, but the query displays the field as the ID# and not
the Company Name. I am having the same problem with all the other combo boxes
on the form.

Please help!
 
you're welcome ;) happy to help

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*



I do have all the elements you stated in #2, but I think my problem is #1. I
will probably have to alter my form source to just one table as you
recommended.

Thanks for your help!

strive4peace said:
you have 2 issues:

1. If you cannot add or edit, chances are that the RecordSource of the
form is based on multiple tables. It is best to based each form or
subform on just one table.

2. to show second column of combo to the user but store data from the
first (hidden) column:

RowSource:
SELECT IDfieldname, TextToShow
FROM Tablename
ORDER BY TextToShow

ControlSource --> IDfieldname from form RecordSource
ColumnCount --> 2
columnWidths --> 0;2
ListWidth --> 2.2 (sum of Column widths + 0.2" for scrollbar)

the trick is the first column being zero in the column widths property
of the combo. For more information, read the Combobox Example in this
document:

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

and post back with more questions if you need to ;)


Warm Regards,
Crystal
remote programming and training

*
(: have an awesome day :)
*



I have a form [frmContractMain] which data source is a query
[qryContractMain_Active]. This form can allow users to edit fields, but not
add a new record. One of the fields on the form is a combo boxe
[cmboCompanyName].

Now, when someone edits a combo box on a record, the form displays the
appropriate information, but the query displays the field as the ID# and not
the Company Name. I am having the same problem with all the other combo boxes
on the form.

Please help!
 
Back
Top