can access disable a field based on the format of another field?

K

kkjd

I notice that this feature is avaliable in Infopath but im hoping someone may
know how to disable / enable a field based on a "yes/no" response in a
previous field.
For example the default response in the [US citizen] field is {yes}. When
users uncheck the box,leaving a {no} response, I would like the field [
international citizenship] to be enabled to enter the contry of citizenship.
 
K

Klatuu

Use the After Update event of the Check Box control:
Me.txtInternationalCitizen.Enabled = Not Me.chkUSCitizen

You will also need to put the same line of code in the Form's Current event
so it will set the value for existing records.
 
K

kkjd

Thats a bit technical can you walk me through it? When I open the form in
design veiw:
- Select the field "international citizen"
- select "properties"
- select "events" tab
- go to after update then i have 3 options: expression builder, code builder
or macro builder. There is also the drop down box that ask about event
proceedure then takes me to another screen. What is this ?

Klatuu said:
Use the After Update event of the Check Box control:
Me.txtInternationalCitizen.Enabled = Not Me.chkUSCitizen

You will also need to put the same line of code in the Form's Current event
so it will set the value for existing records.

I notice that this feature is avaliable in Infopath but im hoping someone may
know how to disable / enable a field based on a "yes/no" response in a
previous field.
For example the default response in the [US citizen] field is {yes}. When
users uncheck the box,leaving a {no} response, I would like the field [
international citizenship] to be enabled to enter the contry of citizenship.
 
K

Klatuu

Actually, you want to use the Code builder option, but not in the text box
control. You want to use the combo box's after update to change the enabled
property of the text box.

Thats a bit technical can you walk me through it? When I open the form in
design veiw:
- Select the field "international citizen"
- select "properties"
- select "events" tab
- go to after update then i have 3 options: expression builder, code builder
or macro builder. There is also the drop down box that ask about event
proceedure then takes me to another screen. What is this ?

Klatuu said:
Use the After Update event of the Check Box control:
Me.txtInternationalCitizen.Enabled = Not Me.chkUSCitizen

You will also need to put the same line of code in the Form's Current event
so it will set the value for existing records.

I notice that this feature is avaliable in Infopath but im hoping someone may
know how to disable / enable a field based on a "yes/no" response in a
previous field.
For example the default response in the [US citizen] field is {yes}. When
users uncheck the box,leaving a {no} response, I would like the field [
international citizenship] to be enabled to enter the contry of citizenship.
 

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