Editing fields based on Yes/No field

K

Khalil Handal

Hi,
frmForm1 (with sorce tblTable1) has a Yes/No field (MarialStatus). If it is
"checked" (means yes) then four different fields has to be filled.
Is it possible to make these four fields active" (can be edited) only when
MarialStatus field is checked (yes). All the fields are in one table.
 
P

pietlinden

Hi,
frmForm1 (with sorce tblTable1) has a Yes/No field (MarialStatus). If it is
"checked" (means yes) then four different fields has to be filled.
Is it possible to make these four fields active" (can be edited) only when
MarialStatus field is checked (yes). All the fields are in one table.

yes. set the Enabled property of each to (MaritalStatus = Checked)
and maybe the Locked property to NOT (MaritalStatus = Checked) in the
AfterUpdate event of the MaritalStatus control.
 
K

Khalil Handal

Tried but didn't succedd. Can you be more specific were to go?

Hi,
frmForm1 (with sorce tblTable1) has a Yes/No field (MarialStatus). If it
is
"checked" (means yes) then four different fields has to be filled.
Is it possible to make these four fields active" (can be edited) only when
MarialStatus field is checked (yes). All the fields are in one table.

yes. set the Enabled property of each to (MaritalStatus = Checked)
and maybe the Locked property to NOT (MaritalStatus = Checked) in the
AfterUpdate event of the MaritalStatus control.
 
C

Clif McIrvin

Khalil Handal said:
Tried but didn't succedd. Can you be more specific were to go?

You *did* say you are using a form, correct? As long as the fields are
bound to controls on the form it matters not what table they're in.

It seems to me that you need to set the status of these four controls
according to Piet's suggestion in both the Form's OnCurrent event (ie,
when a record is first opened), and again in the MaritalStatus control's
AfterUpdate event.

HTH
 
K

Khalil Handal

Yes, I am using a form.
How do I find the Form's OnCurent event???
I could found lot of properties on the detaild part of the form, but none of
them was OnCurent???
 
J

John W. Vinson/MVP

Yes, I am using a form.
How do I find the Form's OnCurent event???
I could found lot of properties on the detaild part of the form, but none of
them was OnCurent???
To view the Form's properties, don't select the detail section (the
body of the form); instead select the little square box at the upper
left intersection of the rulers in design view. Then choose the Events
tab on the properties window.
 
K

Khalil Handal

Thanks a lot

John W. Vinson/MVP said:
To view the Form's properties, don't select the detail section (the
body of the form); instead select the little square box at the upper
left intersection of the rulers in design view. Then choose the Events
tab on the properties window.
 

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