Conditional visibility based on input (1 Viewer)

DocBlack4444

New member
Local time
Yesterday, 23:40
Joined
Oct 16, 2019
Messages
12
Hello everyone,

I am creating a database that has a couple of levels.

The open form, which gives three choices, Student, Admin or close.

The Admin form is password protected on load, and it is working fine.

The Student form is the one that i need a little help with.

when it loads a record, it has students 1-16 listed and i am allowing people to place their names under each one. here is what i want.... i want the name section to cover up or black out or disappear completely once there is information in the field.

then there is the interesting part that the students can look between classes on the same form and i want it to do the same thing based on which class they are looking at.

I have been looking up conditional visibility and that seems to be what i am wanting, but i cant seem to find a code that does it. can someone point me in the right direction to find the code that i can make my own?

Thank you
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:40
Joined
Oct 29, 2018
Messages
21,454
Hi. Welcome to AWF! You could certainly use conditional formatting to black out the names but nothing will prevent the user from selecting the text and see it anyway. What exactly are you trying to prevent?
 

DocBlack4444

New member
Local time
Yesterday, 23:40
Joined
Oct 16, 2019
Messages
12
Hi. Welcome to AWF! You could certainly use conditional formatting to black out the names but nothing will prevent the user from selecting the text and see it anyway. What exactly are you trying to prevent?

Thank you for the Welcome. I am trying to prevent any of the students from seeing who else is signing up for classes.

I plan on splitting the database and placing the locked front end in a shared folder for all users of our company systems.

i just have to get it right before i can deploy.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:40
Joined
Oct 29, 2018
Messages
21,454
Thank you for the Welcome. I am trying to prevent any of the students from seeing who else is signing up for classes.

I plan on splitting the database and placing the locked front end in a shared folder for all users of our company systems.

i just have to get it right before i can deploy.

Hi. If you have a way to identify who is currently viewing the data, then a better approach is to filter the form, so that all they can see are their own records. Are you able to determine who is using the database?
 

DocBlack4444

New member
Local time
Yesterday, 23:40
Joined
Oct 16, 2019
Messages
12
Hi. If you have a way to identify who is currently viewing the data, then a better approach is to filter the form, so that all they can see are their own records. Are you able to determine who is using the database?

I don't have that ability yet. I am trying to make this work in the short term until we get our full sharepoint in which they will be able to sign up for things and it will be user dependent. until then, this is my best hope.

the goal in hiding names from all users is to prevent "buddies" from purposely signing up for a class time that has other "buddies" in it. we have around 4600 employees that will access this at some time or another.
 

Gasman

Enthusiastic Amateur
Local time
Today, 07:40
Joined
Sep 21, 2011
Messages
14,232
I plan on splitting the database and placing the locked front end in a shared folder for all users of our company systems.

i just have to get it right before i can deploy.

Don't do that. Each user should have their own COPY of the front end.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:40
Joined
Oct 29, 2018
Messages
21,454
I don't have that ability yet. I am trying to make this work in the short term until we get our full sharepoint in which they will be able to sign up for things and it will be user dependent. until then, this is my best hope.

the goal in hiding names from all users is to prevent "buddies" from purposely signing up for a class time that has other "buddies" in it. we have around 4600 employees that will access this at some time or another.

Okay. Let me ask you another way. What would letting the users view all the data except the names help them do? If none, then it's easy enough to only show new records and hide away all previous ones.
 

DocBlack4444

New member
Local time
Yesterday, 23:40
Joined
Oct 16, 2019
Messages
12
Okay. Let me ask you another way. What would letting the users view all the data except the names help them do? If none, then it's easy enough to only show new records and hide away all previous ones.

Any way that I can get it will work just fine. I need a way to list all available classes and how many slots are left without showing who is already signed up.

what i have right now is a very simple form that lists students 1-16 and i was thinking about just having access cover up those that had information typed in and show those that did not. but if there is another way to list this, then i am all for it.

i am attaching a picture of the form that i made, it is very simple.
 

Attachments

  • Capture.JPG
    Capture.JPG
    50.6 KB · Views: 64

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:40
Joined
Oct 29, 2018
Messages
21,454
Any way that I can get it will work just fine. I need a way to list all available classes and how many slots are left without showing who is already signed up.

what i have right now is a very simple form that lists students 1-16 and i was thinking about just having access cover up those that had information typed in and show those that did not. but if there is another way to list this, then i am all for it.

i am attaching a picture of the form that i made, it is very simple.
Hi. Your form design tells me your table design may not be optimized for a database system. However, if that's what your form looks like, then it's easy to hide the filled in boxes. Unfortunately though, if you continue with this design, you will undoubtedly run into other problems later on. I recommend starting out with a proper table design, which would allow you to take advantage of what databases do best. This should result in less headaches for you.
 

DocBlack4444

New member
Local time
Yesterday, 23:40
Joined
Oct 16, 2019
Messages
12
Hi. Your form design tells me your table design may not be optimized for a database system. However, if that's what your form looks like, then it's easy to hide the filled in boxes. Unfortunately though, if you continue with this design, you will undoubtedly run into other problems later on. I recommend starting out with a proper table design, which would allow you to take advantage of what databases do best. This should result in less headaches for you.

I am not sure how to do that.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:40
Joined
Feb 19, 2002
Messages
43,223
Normalizing the schema would make this oh so much simpler. Then you could give the students access to a subform in Data Entry view. This brings up an empty form and allows them to add a new record. The main form can show the class information and the # of available slots left.
 

DocBlack4444

New member
Local time
Yesterday, 23:40
Joined
Oct 16, 2019
Messages
12
How about this? Can you post a copy of your db with test data, so can help you design it?

here it is. I have 13 classes planned out so far.
the open form is what was going to pop up first with the other forms hidden from view. the set up form gives access to the admins (myself and one other) to add more classes and see who is signed up for the class. there is a password on that form it is "password" i can change that later. the sign up form is the one that i want to hide data on once a user puts their name in there.
 

Attachments

  • Class Sign up.accdb
    868 KB · Views: 63

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:40
Joined
Oct 29, 2018
Messages
21,454
here it is. I have 13 classes planned out so far.
the open form is what was going to pop up first with the other forms hidden from view. the set up form gives access to the admins (myself and one other) to add more classes and see who is signed up for the class. there is a password on that form it is "password" i can change that later. the sign up form is the one that i want to hide data on once a user puts their name in there.

Okay, thanks. Give me some time to go through this. I'll try to get something back to you tomorrow, unless somebody else beats me to it.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:40
Joined
Oct 29, 2018
Messages
21,454
here it is. I have 13 classes planned out so far.
the open form is what was going to pop up first with the other forms hidden from view. the set up form gives access to the admins (myself and one other) to add more classes and see who is signed up for the class. there is a password on that form it is "password" i can change that later. the sign up form is the one that i want to hide data on once a user puts their name in there.
Hi. Check out the attached. This is just one approach out of many. There are probably better ways to do it, but it's just something I did with the little time I had to work with. I'm sure we can do better if we had more time. Please let me know what you think. Cheers!
 

Attachments

  • Class Sign up.zip
    69.8 KB · Views: 63

DocBlack4444

New member
Local time
Yesterday, 23:40
Joined
Oct 16, 2019
Messages
12
Hi. Check out the attached. This is just one approach out of many. There are probably better ways to do it, but it's just something I did with the little time I had to work with. I'm sure we can do better if we had more time. Please let me know what you think. Cheers!

this does solve the hide names problem. Thank you. I will PM you.
 

DocBlack4444

New member
Local time
Yesterday, 23:40
Joined
Oct 16, 2019
Messages
12
it looks like i wont PM you. or at least, i cant figure out how to in this forum.

Looking further at the additions, i have a couple of questions about how navigation or addition of students as well as showing students how many spots are left in each class. I know that you said that you did it quickly, and that more can be done.

First, thank you for all the help and the build. I am pretty much a Access Noob. I know how to say what i want it to do, just not able to make it do that myself.

are you willing to help finish this build so i can get it up and running?

Please let me know, as i have some questions.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:40
Joined
Oct 29, 2018
Messages
21,454
it looks like i wont PM you. or at least, i cant figure out how to in this forum.

Looking further at the additions, i have a couple of questions about how navigation or addition of students as well as showing students how many spots are left in each class. I know that you said that you did it quickly, and that more can be done.

First, thank you for all the help and the build. I am pretty much a Access Noob. I know how to say what i want it to do, just not able to make it do that myself.

are you willing to help finish this build so i can get it up and running?

Please let me know, as i have some questions.
Hi. If you have some personal questions or information you don't want to post in the forum, you can email them to me.

If you ask your questions here, I or the others will try our best to help you. Please remember that we can only spend our free times here, so that may affect your project timeline too.
 

DocBlack4444

New member
Local time
Yesterday, 23:40
Joined
Oct 16, 2019
Messages
12
Hi. If you have some personal questions or information you don't want to post in the forum, you can email them to me.

If you ask your questions here, I or the others will try our best to help you. Please remember that we can only spend our free times here, so that may affect your project timeline too.

alright, so i think i finally figured out how to do what i wanted to do. i am using the Form's On Current selection and i am toggling the visibility of the item on and off based on a value in the field. here is a copy of the code that i used.

Code:
Private Sub Form_Current()
If IsNull(Me.Student_1) = False Then
Me.Student_1.Visible = False
Else
Me.Student_1.Visible = True
End If
End Sub

the last issue that i am having is how do i say this same thing for each of the other 15 fields, being that they are each their own and the visibility would depend on each one being filled or not?
 

Gasman

Enthusiastic Amateur
Local time
Today, 07:40
Joined
Sep 21, 2011
Messages
14,232
You should be opening the form for

Code:
DoCmd.OpenForm "frmClassSchedule"

There is no studentx on that.?:confused:
 

Users who are viewing this thread

Top Bottom