By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,759 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Unbound controls of a form onto a report using vba/command button

P: 90
I have an unbound form with some unbound controls such as combo boxes or textboxes, in MS Access 2013. I have a report with the similar controls. I do open the report from the form by a command button using vba code. I want to get the data/values from the combos/textboxes's controls in the report's controls using a command button on the form. Any help please!
Mar 16 '15 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,107
Probably the easiest way is to use TempVars. Use something like this from your command button on your Form to save off the value of a TextBox into a TempVar:
Expand|Select|Wrap|Line Numbers
  1. TempVars.Add "SomeValue", Me.txtBox.Value
Then use something like this as the Control Source for a TextBox on the Report to get the value for the TempVar:
Expand|Select|Wrap|Line Numbers
  1. =[TempVars].[Item]("SomeValue")
Mar 17 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.