Solved Shrink control on report (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 15:17
Joined
Sep 21, 2011
Messages
15,534
I have to keep a log of my blood pressure for a while, so I created a simple report.
I added a comment field in the table, just for that reason.

However if nothing is in that field, I expected by setting Can Grow and Can Shrink to Yes, that I would not see that if nothing was in that field for that control?
However I still see the control, even when empty?

I tried setting it to next to nothing (0.01) in height and expecting it to grow when it has some data in it, but it stayed at that height?

So what am I missing please?

As 0.5 height
1727730948437.png


Reduced to 0.01 height
1727731023740.png
 
Not sure or can't remember exactly why those properties are available in a form, but I remember them working on reports only.

PS. If I remember it correctly, I think it only works in forms when you print the form.
 
Can shrink won't work if any controls overlap.
Post a picture of the form in design view and we might be able to see the issue.
 
The label control “Comment:” does not shrink with the text box. You can change the label to a text box and set its control source to:
="Comment: "+[Comment Field]
Set this new text box to can shrink. Using the + will make the entire expression null in the field is null.
 
I have to keep a log of my blood pressure for a while, so I created a simple report.
You mention a "simple report" but your screenshots appear to show a form.

For forms the CanGrow/-Shrink properties only have an effect if the form is printed.
 
That is it people.
Sorry, I was being a dumbass, it is a form not a report. :mad:

@DHookom will that work for a form at all? Prevalent opinion is those properties do not work for forms.

Why I thought I was using a report is beyond me. I know I am getting old, but still.... :(
 
I have to keep a log of my blood pressure for a while, so I created a simple report.
I added a comment field in the table, just for that reason.

However if nothing is in that field, I expected by setting Can Grow and Can Shrink to Yes, that I would not see that if nothing was in that field for that control?
However I still see the control, even when empty?

I tried setting it to next to nothing (0.01) in height and expecting it to grow when it has some data in it, but it stayed at that height?

So what am I missing please?

As 0.5 height
View attachment 116267

Reduced to 0.01 height
View attachment 116268
Good luck dealing with your blood pressure. A lot of us are in the same boat. I have found that daily tracking is a good way to maintain motivation to keep doing the things necessary to achieve success. My records go back 9 years now.

As an aside, I have observed that a consistent time, location and seated position are really important to getting reliable results.

With regard to the "report" aspect, as others have noted, Reports are usually the best tool for reporting when you need to manipulate the output. Try creating a report, therefore, that displays the data as you want to show it, rather than fuss over a form, which is not intended for reporting anyway. Or, even better, look into a reporting tool, like PowerBI, which is designed and built for just this kind of task.

1727783033746.png
 
You can write code to shrink a control (i.e. resize it) but only works on single forms. Typically the code would be called from the current event. You might have more code to expand it when it has the focus

In some situations, using a sub report on your form may be a solution
 
Good luck dealing with your blood pressure. A lot of us are in the same boat. I have found that daily tracking is a good way to maintain motivation to keep doing the things necessary to achieve success. My records go back 9 years now.

As an aside, I have observed that a consistent time, location and seated position are really important to getting reliable results.

With regard to the "report" aspect, as others have noted, Reports are usually the best tool for reporting when you need to manipulate the output. Try creating a report, therefore, that displays the data as you want to show it, rather than fuss over a form, which is not intended for reporting anyway. Or, even better, look into a reporting tool, like PowerBI, which is designed and built for just this kind of task.

View attachment 116281
Thank you @GPGeorge
Your BP is way better than mine?
I am taking readings in the same spot, but often forget. Last Friday I was up at 0700 and only remembered to do it at 0925. :)

Is there any chance I could get a copy of that report you show there please?, or is that the PowerBI report?
 
@Gasman Here's a database I've been adding to for almost 20 years now. I started it for my husband to track his diabetes meds. Then I added to it for other family members. They all love it.

I like George's report. Maybe I'll look into creating some graphs.
 

Attachments

Thank you @Pat Hartman
I too liked George's graph, so much, so that I tried to create mine, but in Excel, as it has better graphing features.


[td]
[/td]
[td]
[/td]
[td]
[/td]
[td]
[/td]
 

Attachments

  • 1727852239598.png
    1727852239598.png
    19.9 KB · Views: 12
Yes. I have since downloaded PowerBI for Desktop, but TBH cannot make head or tail with it. :mad:
I just want a simple chart that shows what is in the table graphically.

I need to have each row in the table as a seperate set of columns. I can get then all 3 (distolic, systolic, pulse) as columns and the values overlayed, but that does not allow you to see whcih goes with what. :(

Both Excel and PBI want to sum or count everything all the time, and I just need individual values.

I am going to try and review a few Youtube tutorial videos.

This is not a must have, but a nice to have, and as I am retired, I thought I would give it a go. :)
 
Thank you @GPGeorge
Your BP is way better than mine?
I am taking readings in the same spot, but often forget. Last Friday I was up at 0700 and only remembered to do it at 0925. :)

Is there any chance I could get a copy of that report you show there please?, or is that the PowerBI report?
That's the PowerBI I created.

I track the data in Access/SQL Azure. The PowerBI report is local on my computer as a pbix file and also on SharePoint.
Because of the way PBI works, I have to manually update the local file and publish it to SharePoint. There are ways to make that automatic, but of course MS charges for that, so I don't go that route.

The best part is that, in my PCP's office, I can bring up the PowerBI report on my smart phone and show her recent history, if appropriate.

Back to the discipline and consistency aspect. I find that it's easier to just sit down and take daily measurements while I wait for coffee to brew. I have missed a few times, of course, but it's harder to forget when I have to do it at the same time every time, and I NEVER forget the morning cup of coffee. ;)
Yes. I have since downloaded PowerBI for Desktop, but TBH cannot make head or tail with it. :mad:
I just want a simple chart that shows what is in the table graphically.

I need to have each row in the table as a seperate set of columns. I can get then all 3 (distolic, systolic, pulse) as columns and the values overlayed, but that does not allow you to see whcih goes with what. :(

Both Excel and PBI want to sum or count everything all the time, and I just need individual values.

I am going to try and review a few Youtube tutorial videos.

This is not a must have, but a nice to have, and as I am retired, I thought I would give it a go. :)
I'm not a PowerBI expert by any means, and yes, it took a lot of time and effort to get the hang of it. However, it's a lot more on point that even Excel, IMO.

I've got half a mind to try to do some charts in Access, now that the Modern Chart controls are rolling out.
 

Users who are viewing this thread

Back
Top Bottom