if statement per record in a subform

kdt

Registered User.
Local time
Today, 19:03
Joined
Apr 5, 2006
Messages
48
Hi,

I'm trying to write a simple update vb code for showing/hiding a text box dependent on whether any values are present in subforms:

Private Sub Form_Current()

If Not IsNull(Me.tbComments) Then

Me.LblComments.Visible = True 'shows Comments label when comments box is not Null

Else: Me.LblComments.Visible = False 'otherwise hide comments box label


End If
End Sub

The above code works, however if a value in one of the subform records is true, it seems to make the text box visible in all records. Is there a way to make this specific to per record?

Thanks
 
If you are using a tabular form No... You may wanna try Conditional formating to try and do this...
 
Thanks for the feedback. I am using a continuous form, but unfortunately in access 97 which I beleive doesn't support conditional formatting. Can anyone correct me on this, or does anyone know a way around this problem??
:)
 
Access 97 does not have the conditional format option. You will not be able to do what you want with a continous form in Access 97. Somebody might have a work around but I would have to imagine that it involves a lot of code.
 
cheers ghudson, I wont be needing it anymore. I've been using your zoom function that was part of your audit trail on this form- which by the way is excellent

:D
 

Users who are viewing this thread

Back
Top Bottom