I am a bit confused. Apparently you want to move non-hidden controls in
addition to hidden controls. Correct? Are all of these in the same report
section?
I think this might be caused by non-normalized table structures. Could you
provide some background regarding this issue? I think there might be a better
solution but I don't know exactly what you are attempting to accomplish. You
have only told us how you are attempting to accomplish.
--
Duane Hookom
Microsoft Access MVP
Loren said:
On Feb 25, 11:47 am, Duane Hookom <duanehookom@NO_SPAMhotmail.com>
wrote:
Hi Loren,
If they are not visible, then why move them?
If you really need this, then share your existing code that sets the visible
property.
:
I am attempting to shift some textboxes and their associated labels to
the left on a report. Currently, I have them only appearing when a
True value is encountered by utilizing the code: txt1.visible = Nz
([txt1], 0)<>)
Each of my textboxes is labeled txt1, txt2, txt3 etc...
I would appreciate any help, as this is the final step in a project I
have built. Thank you.- Hide quoted text -
I wanted them to not only hide, but to shift left since this is the
action I have the checkboxes currently performing in the "Details"
section of the report and these textboxes are located in the "Exercise
Type Header". I think the problem is that I have an expression tied in
to this that produces a sum of the number of times a unit has run an
exercise, but am not quite sure how to set up the query to resolve
this issue. The expression code is: Sum(IIf([ExerciseDetails_1HS],
1,0))
This is the code I am using for the checkboxes, and then the code used
to shift them left eliminating the white space.
Me("chk" & 1).Visible = (Me("chk" & 1) = True)
Dim IngLeft as Long
Dim intcount as Integer
Dim intwidth As Integer 'width of one control
Dim ctl as Control
IngLeft = Me ("chk1"). Left
intwdith = 1000
For intCount = 1 To 41
Set ctl = Me ("chk" & intCount)
If ctl. Value = True Then
ctl. visible = True
'move the checkbox
ctl. Left = Ing Left
'move the label
ctl. Controls(0). Left = IngLeft
'set the next horizontal position
IngLeft = IngLeft + intwidth
Else
ctl.visible = False
End If
Next- Hide quoted text -
- Show quoted text -
I have a report that is used to monitor the participation of units
performing exercises. I have 41 units that are being tracked by using
the checkbox. The report is grouped by exercise type with the
applicable dates below across the top are the headers for each unit.
The original issue I had was that 41 headers would not fit across the
screen of one page and since I would never have an exercise with more
than 20 participants I decided to hide the checkboxes that were not
checked and then have them shift left to eliminate white space and
allow better readability.
In this report I wanted to be able to give the user the ability to
quickly know how many times a unit ran a particular exercise. So I
created a textbox with this expression for each unit: Sum(IIf([unit
name],1,0)) It works great, but I run in to the same problem as the
checkboxes...not enough space. I have been able to hide each of the 41
textboxes with the code: txt1.visible = Nz ([txt1], 0)<>) The problem
now is that I can not use a similar code that I used for the
checkboxes to shift all textboxes with a value to the left.
Currently in the query for this report I have date, exercise type, and
the 41 units via checkbox. I hope this makes a little more sense.
Thank you for your quick replies.
Loren