Fields yes/no me.fieldname.enabled=false?

H

Harmannus

Hallo,

I have a check yes/no "invoice" field. If the value is yes i want to
activate the field InvoiceAddress.

Behind which events do i place the various me.address.enabled=false or =true
values?

I tried a lot of combinations but no succes.

The default value of the invoice yes/no field = no

So opening the form should show me.InvoiceAddress.enabled=false but if the
invoice yes/no field is yes it should show me.InvoiceAddress.enabled=true

Unchecking invoice to no should change me.InvoiceAddress.enabled=false

Checking it to yes should chance me.InvoiceAddress.enabled=True

Thanx for any tips!

Regards,

Harmannus
 
S

Scott McDaniel

In the Click Event of your checkbox: (which I have named chkInvoice)

Me.InvoiceAddress.Enabled = Not Me.chkInvoice

Note that you would want to set Enabled=No at designtime for the
InvoiceAddress field, as this code will not run until the user takes action.
 

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