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