ChrisTheAncient
Technical User
I did try this thought process in the vb forum, but I now feel it is more Access specific than vb specific.
I'm using Acc XP with a need to later convert 'down' to A97 as well.
My form is based on a table with three fields...
Task - a text field, Complete - a yes/no and Score - an option group returning a number value.
The idea is that any row may have a defined task that is to be completed and then a score given.
There are 25 rows with Task1, Complete1, Score1 then Task2, Complete2, Score2 etc... through to Task25, Complete25, Score25.
Not every user of the database may necessarily use all 25 tasks, so I was working on a system that 'hides' the row if there is nothing defined as a task for that row.
When the form is opened, the event procedure I have got working so far works for any given row. The code goes...
Code:
Private Sub Form_Open(Cancel As Integer)
[COLOR=green]'***** set up the rows to visible if there is a task defined[/color]
If Task1 > "" Then
Task1.Visible = True
Complete1.Visible = True
Complete1.Enabled = True
If Complete1 = False Then
FrameScore1.Visible = False
FrameScore1.Enabled = False
End If
Else
Task1.Visible = False
Complete1.Visible = False
Complete1.Enabled = False
FrameScore1.Visible = False
FrameScore1.Enabled = False
End If
End Sub
And that works really fine and dandy - on a row by row basis.
Now if I didn't care about my programming, I'd just repeat that whole routine for each of the 25 rows and just change the suffix type number.
But...
I'm flipping sure that this must be able to be done using For...Next... looping. I've read as much as possible from the 'Help' system as I can about loops and arrays. But I'm getting nowhere! As my tag says, I'm stoopid, and you can see from the code above, I'm not a particular whizz at it.
Can you offer any more light on the subject before my last brain cell frazzles away to nothing?
TIA
Chris
*************************************
OK, I'm stoopid. But I'm good at it!
*************************************