467,184 Members | 1,258 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,184 developers. It's quick & easy.

MS Access: Binding a Textbox to a Pivot Table Cell

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
  • viewed: 4027
Share:
5 Replies
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
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
bump. Somoene please help :)
Oct 13 '06 #4
someone? anyone?
Oct 16 '06 #5
MMcCarthy
Expert Mod 8TB
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.

Similar topics

1 post views Thread by Abareblue | last post: by
3 posts views Thread by Jerry K via DotNetMonster.com | last post: by
1 post views Thread by kingster | last post: by
reply views Thread by comp974@comp974.com | last post: by
2 posts views Thread by =?Utf-8?B?cm9kY2hhcg==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.