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

MS Access: Binding a Textbox to a Pivot Table Cell

P: 9
Hello,

I have an Access Data Access Page which has a pivot table. The data source of the pivot table is a SQL database table. The data in the pivot table itself is not a problem.

I have a text box below the pivot table. Let's say the pivot table has: First Name, Last Name, and Address. When I click on a record in the pivot table, I want the Address for that selected record to be displayed in the textbox below.

What I have currently done is create a textbox and in the ControlSource of the textbox I put the Address field name. However, the content of the textbox is not changing when I click on different records in the pivot table. It does change when I go to the next record from the Record Navigation.

So if someone could help me tie the textbox value to the cell in the pivot table record that has focus I would be very grateful!

Thank you,
Oct 12 '06 #1
Share this Question
Share on Google+
5 Replies


P: 5
Your code needs to go on the table, and be based one the event triggered when focus is changed to a particular record, or a different record. Your code should send the address field data for the selected record to the text box.

I couldn't tell you how to do this in specific code, or I'd be able to solve my own problem posted here 8^D, but that should give you an idea what you need to do.
Oct 12 '06 #2

P: 9
Your code needs to go on the table, and be based one the event triggered when focus is changed to a particular record, or a different record. Your code should send the address field data for the selected record to the text box.

I couldn't tell you how to do this in specific code, or I'd be able to solve my own problem posted here 8^D, but that should give you an idea what you need to do.
I haven't written any code to create the table. I just used the design view and dropped things in. I'm not sure where I would even put the code. I have been searching for the click event for the record, but I havent found anything regarding that. I think pivot tables work differently in data access pages than they do in forms. Thanks for your input.
Oct 12 '06 #3

P: 9
bump. Somoene please help :)
Oct 13 '06 #4

P: 9
someone? anyone?
Oct 16 '06 #5

MMcCarthy
Expert Mod 10K+
P: 14,534
You need to put code in the Form_OnCurrent event to requery the textbox.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Form_OnCurrent()
  3.  
  4.   Me.textboxName.Requery
  5.  
  6. End Sub
  7.  
  8.  
Hello,

I have an Access Data Access Page which has a pivot table. The data source of the pivot table is a SQL database table. The data in the pivot table itself is not a problem.

I have a text box below the pivot table. Let's say the pivot table has: First Name, Last Name, and Address. When I click on a record in the pivot table, I want the Address for that selected record to be displayed in the textbox below.

What I have currently done is create a textbox and in the ControlSource of the textbox I put the Address field name. However, the content of the textbox is not changing when I click on different records in the pivot table. It does change when I go to the next record from the Record Navigation.

So if someone could help me tie the textbox value to the cell in the pivot table record that has focus I would be very grateful!

Thank you,
Oct 16 '06 #6

Post your reply

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