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

Real time updating charts in an access form

P: 4
Hello,

I am in the middle of an access database projet but are struggerling with a couple of things. I dont expect anyone to solve the problem for me, but would really appreciate a pointer in the right direction as I am starting to struggle in terms of direction on this.

Problem no1:

I am currently trying to build an interactive calculator in a access form.

Im making ok progress but have a couple of things I cant work out how to overcome, and its starting to do my head in.

The intention is that the calculator will consist of a series of scroll bars that default to component aspects of current performance (in percent) and allow you to move the bars to populate a pie chart real time, as you move the scroll bars.

I am currently using combo boxes to generate the change - hence could do with some ideas on how I can utilise a more user freindly scroll bar approach that enables me to move through a dataset auto selecting as I go (rather than point and click as in a combo box). I hope thats clear.

Problem No2:

The other is to enable the chart to respond instantly to changes in the component performance scroll bars above it. I have been dabbling with the requery function. But if someone can give me a pointer, would be most appreciated.

Problem No3:

The final thing is how I can in a continous form change the background colour of a series of text boxs based on seperate start and end date field in each record in the form to create an interactive gant chart (provide a project management tool) manage total projects). I have had some success with this but it changes the background of the text box in all records rather than be specific to individual records.

As already stated i havent posted this as a wish list, but just to aid me in terms of the right direction to solve these probs. All help welcome.

Kev

email:
Mar 31 '07 #1
Share this Question
Share on Google+
4 Replies


Denburt
Expert 100+
P: 1,356
I am in the middle of an access database projet but are struggerling with a couple of things.
O.K. first this is a VB forum if you are designing an app in MS Access then it should be in the MS Access forum that said.

1. Try using the Microsoft Slider Control.

Expand|Select|Wrap|Line Numbers
  1. Sub UpdateSlider()
  2.     Dim rst As Recordset
  3.     Set rst = Me!subfrmTabinfo.Form.RecordsetClone
  4.     rst.MoveLast
  5.     rst.MoveFirst
  6.     On Error Resume Next
  7.     With Me
  8.         !Slider.Max = Me!subfrmTabinfo.Form.RecordsetClone.RecordCount
  9.         !Slider.Value = 1
  10.     End With
  11. End Sub
  12.  
2. Refresh, repaint?

3. Check out the following thread: Change bg colour of different records in continuous forms


Good Luck
Mar 31 '07 #2

P: 4
Thanks for the advice, It helped the chart now updates on a refresh command button. Having a little difficulty making this work attached to the fields as an event procedure to do this without the command button, but i am sure this is a prob i can solve.

The prob i am having though is around the slider script you forwarded. What I have been playing with is a subform and attempting to move through this data auto selecting. Therby populating a field in the form that underlies the chart via a query (im using access 2000).

If you can help with with getting the slider bit to work be much appreciated.
Apr 1 '07 #3

Denburt
Expert 100+
P: 1,356
The prob i am having though is around the slider script you forwarded. What I have been playing with is a subform and attempting to move through this data auto selecting. Therby populating a field in the form that underlies the chart via a query (im using access 2000).
Sorry I reread my post and realized it was incomplete.
When your onload event occors for the form run the UpdateSlider Command that will initialize it.

I didn't see this in any of the event properties in the MS Access properties but if placed in the forms module you should be O.K.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Slider_Scroll()
  2.  
  3.     With Me!subfrmTabinfo.Form
  4.         .RecordsetClone.Move (Me!Slider.Value - .CurrentRecord)
  5.         .Bookmark = .RecordsetClone.Bookmark
  6.     End With
  7. End Sub
Is the subform linked to the main form? If so then the approach would be just a little different.

Goodluck let us know how it goes.
Apr 1 '07 #4

P: 4
Thanks for this, it makes sense, I was begining to loose my mind. To many hours staring at the screen. I will try this tonight.

The answer to the question regarding whether the subforms are linked to the main form is yes. The purpose of this is I want them to defaulting to current performance. The subforms represent the component parts of overall performance in %. Is this likley to be a problem?

Either way i'll give this a go and will post an update on when I get it to work.

Kev
Apr 1 '07 #5

Post your reply

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