Kate has attended:
Access Introduction course
Access Intermediate course
Access
I am trying to design a form for our dealflow database that will hide certain criteria when a certain box is ticked. Reason for this is that it contains both individual projects and portfolios of projects - almost all of the fields are the same but there are a couple that only apply to projects and a couple that only apply to portfolios. How do I do this? Don't want to create two forms as there are 60 or 70 fields in total. Thanks!
RE: Access
Hi Kate
Thank you for your question
I have uploaded a database with one form in it. It has 4 text boxes and a check box. The check box has the following code attached to its "after update" event
Private Sub chk1_AfterUpdate()
If Me.chk1.Value = True Then
Me.txt1.Visible = False
Me.txt2.Visible = False
Me.txt3.Visible = False
Me.txt4.Visible = False
Else
Me.txt1.Visible = True
Me.txt2.Visible = True
Me.txt3.Visible = True
Me.txt4.Visible = True
End If
End Sub
This code will run everytime the value of the check box is altered. It gives you the general code that you would have to write. The key is to set the visible property of the relevant text box to "true" or "false".
I hope this helps. If you require further clarification please don't hesitate to repost
Regards
Stephen
Attached files...
RE: Access
Hi Stephen,
Thanks for getting back to me so quickly on this one. Unfortunately I don't seem to be able to open the sample database you've attached to the email - any idea why this is?
Many thanks,
Kate
RE: Access
Hi Kate
Thanks for getting back to me
Could you email the database back to me and I will have a look at it for you
my email address is stephenATstl-training.co.uk
Thanks
Stephen