Load values from the table into the text

Max_hugo

New Member
Joined
May 3, 2020
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
I have a question for my "TEST" report in the database in which I would like to add values from my "Table" database in the text. I tried to apply a label but I don't know how to add "Table" values to it.

VBA Code:
Test text field Test text field. Test text field Test text field. [Address] Test text field Test text field. [First_name] Test text field Test text field.

In these places I would like the values to be read from the table:
[Address]
[First_name]

Thank you in advance for your answer.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Create a new Query based on your table, and created a calculated field in that query to return that string your posted in in your initial post.
It would look something like this:
VBA Code:
TestPhrase: "Test text field Test text field. Test text field Test text field. " & [Address] & " Test text field Test text field. " & [First_name]  &" Test text field Test text field."
So the literal parts are enclosed in double-quotes, and the variables (field names) are not, and they are combined together with the ampersand (&).

Then, create your Report using this Query, and display the calculated field on it.
 
Upvote 0

Forum statistics

Threads
1,212,933
Messages
6,110,752
Members
448,295
Latest member
Uzair Tahir Khan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top