Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get value from VB textbox to report textbox

Status
Not open for further replies.

pelagic

Programmer
Nov 7, 2002
97
US
Hi All,
on the VB form I have a text box named txtName.text
on the Access report I have also have a textbox name
txtReportName

How do I get value from vb textbox (txtName) to Access report textbox (txtReportName) when I print the the report?

Any idea will help
Thanks,
 
I would place the value from the VB form.txtName.txt into a table and include the table in the report's record source.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Hi pelagic,

Another way to do this is to place an unbound textbox in the header of the report and reference the textbox on the form directly. This will work fine as long as the form with your textbox on it is open at the time the report is printed or previewed. So for a textbox called txtName on a form called frmSample you would set the Control Source property of your unbound textbox in the report header as follows:-
=[Forms]![frmSample]![txtName]

Hope this helps. Regards, PaulG
 
Hi pelagic,

Just re-read your question. Only PROPERLY this time! My answer only works for an Access form of course. It looks like you are trying to pass a value from a VB form which I don't have a clue about! Sorry for wasting your time mate!

Regards, PaulG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top