98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access VBA Training and help » Access VBA
Access VBA
Resolved · Medium Priority · Version 2003
Helen has attended:
Access VBA course
Access VBA
When producing reports from our invoicing database - for some fields the output shows the primary key ID number rather than the contents of the TABLE/QUERY. This only happens when the item in the table is a lookup e.g. to lookup supplier names.
I got around this problem by deleting the ID column and changing the primary key in the relevant table to the field we wanted to show on the report e.g. the supplier name field.
I would like to know if it
RE: Access VBA
Hi Helen
Thank you for your question
Ideally, the best solution is to display the relevant fields in a combo box on the form and hide the key column. This is done by specifying that the combo should show both the id filed and the supplier name field. Do this by setting the rowsource property to
"SELECT ID,Supplier Name FROM SupplierTable"
Then set the columncount property to 2, and the columnwidths property to "0cm;5cm". This will result in a combo box that just displays the supplier name.
Hope this helps
Regards
Stephen
Thu 18 Jun 2009: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:DsumYou can create percentage values based on individual products / items by using a Dsum function (used with a grouped query) |