Exporting combo box data to word?

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
 
J

Jeff Boyce

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.
 
K

Klatuu

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)
 
Y

Yilmaz

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.





.
 
Y

Yilmaz

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top