Current record, not entire form

G

GD

How would I specify in the code below that I want the action to be performed
at the record level, not the form as a whole? In other words, I need
cboApprBy to be visible if chkPaybackApproved is checked within that record.
As it stands, if I check that box for any record, cboApprBy becomes visible
for all records.

Private Sub chkPaybackApproved_AfterUpdate()
If Me.chkPaybackApproved = True Then
Me.cboApprBy.Visible = True
Else
Me.cboApprBy.Visible = False
End If

End Sub

Private Sub Form_Current()
If Me.chkPaybackApproved = True Then
Me.cboApprBy.Visible = True
Else
Me.cboApprBy.Visible = False
End If

End Sub

Problem #2: The form I'm designing is bound to an older table, so using the
AfterUpdate event is apparently not what I want to use for the above
function. This is because I need for cboApprBy to appear if
chkPaybackApproved is true for the older records, too. But since there is no
updating involved, it doesn't appear unless unchecked and checked again. Is
there another event I can use that depends solely on the true/false value of
chkPaybackApproved? Should I be entering it into Form_Current only?

Thanks!!!!
 
D

dymondjack

Does conditional formatting allow access to those properties? I see the
enabled property there, but I was always under the impression that there was
very limited control with the conditional formatting (bold, italic, colors,
etc).

The enabled property would certainly accomplish the task of not allowing the
user enter information on a record-by-record basis, but as far as I know
there is no way to access commands such as Visible.

Is it possible to do that?


--
Jack Leach
www.tristatemachine.com

- "A designer knows he has reached perfection not when there is nothing left
to add, but when there is nothing left to take away." - Antoine De Saint
Exupery
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top