2

I have a MS Access Database, with each table containing the data of a particular questionnaire. I am building data entry forms for each of these tables, but as the field names may prove to be confusing for end users to comprehend, I have used the Caption property to specify terms that are much more friendly (these terms are automatically added as labels while building a form).

However, once I have done that, I realized that when I export the tables from MS Access to Excel, the resultant Excel file contains column names that are based off the Caption property instead of the underlying Field Name.

Is there a way that I can use Caption for my forms and the underlying Field Name when exporting tables to Excel?

Thanks!

  • 2
    Create a query which have the data format and fieldnames you want to obtain in Excel, and export this query instead of a table or a form. – Akina Sep 13 '18 at 4:49
  • 1
    To expand on Akina's idea, you could avoid having to manually type out all field names in a new query by writing a VBA function which does that for you by looping through all table column names and builds a SQL statement which is then stored in a QueryDef object (i.e. named, saved Access query). Sorry, I don't have time to produce sample code, but hope this helps further. – C Perkins Sep 19 '18 at 6:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.