Controlling field input

G

Guest

Hi. Sorry for the newbie question - I'm quite the novice with Access.

I'm trying to develop an information input/storage type of database for
medical use. I have a table and form called "pre-op info". One of the
fields/controls is a yes/no box called "previous chest surgery?". The next
text box I would like to put on my form is called "Previous chest surgery
description". However, I would only like to allow entry into the "Previous
chest surgery description" text box if the yes/no box for "previous chest
surgery?" is checked for yes. In other words, If the "previous chest
surgery?" check box is not checked, I would like for the user to not be able
to enter anything into the "previous chest surgery description" text box. Or
even better yet, I would like it if the "previous chest surgery description"
text box was only visible if the "previous chest surgery?" check box was
checked for yes.

Is there a way to do this? Thanks for any help.

Thanks.
 
F

fredg

Hi. Sorry for the newbie question - I'm quite the novice with Access.

I'm trying to develop an information input/storage type of database for
medical use. I have a table and form called "pre-op info". One of the
fields/controls is a yes/no box called "previous chest surgery?". The next
text box I would like to put on my form is called "Previous chest surgery
description". However, I would only like to allow entry into the "Previous
chest surgery description" text box if the yes/no box for "previous chest
surgery?" is checked for yes. In other words, If the "previous chest
surgery?" check box is not checked, I would like for the user to not be able
to enter anything into the "previous chest surgery description" text box. Or
even better yet, I would like it if the "previous chest surgery description"
text box was only visible if the "previous chest surgery?" check box was
checked for yes.

Is there a way to do this? Thanks for any help.

Thanks.

Code Check Box AfterUpdate event:

[previous chest surgery description].Visible = [CheckBoxName]

Place the same code in the form's Current event as well.
 

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

Similar Threads


Top