Exporting combo box data to word?

  • Thread starter Thread starter Yilmaz
  • Start date Start date
Y

Yilmaz

Hi there,

I have created some code to export the data from a form into a word document
using bookmarks. This code works fine except that the combobox fields do not
export the data, but the autonumber of the item instead. Is it possible to
change the coding so that the data of the combo box is exported instead of
the autonumber?

Thanks
 
One way to consider would be to export a query (actually, the query's
results). That query would use the record displayed on the form, plus, it
would join to the looked-up table to retrieve the item rather than the
Item_ID.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Sounds like you have a multi column combo. When you reference just the combo
by name, it will return the value in the bound column. If you want the value
from a different column, use the ordinal number of the column. Note the
first column is 0 and the second column is 1, etc. So to get the value in
the third column it would be:

= Me.MyCombo.Column(2)
 
thats brilliant thanks Jeff

Jeff Boyce said:
One way to consider would be to export a query (actually, the query's
results). That query would use the record displayed on the form, plus, it
would join to the looked-up table to retrieve the item rather than the
Item_ID.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.





.
 
thats brilliant. thanks Dave

Klatuu said:
Sounds like you have a multi column combo. When you reference just the combo
by name, it will return the value in the bound column. If you want the value
from a different column, use the ordinal number of the column. Note the
first column is 0 and the second column is 1, etc. So to get the value in
the third column it would be:

= Me.MyCombo.Column(2)
 
Back
Top