Making text boxes visible with a combobox

J

Jeff

I have text a box that become visible when a combobox shows a specified
value("Single"). The on-current event of the Main form the following code
appears:

txb_SingleDate.Visible = IIf(IsNull(cbo_MeetingType.Value), False,
cbo_MeetingType.Value = "single")
This works great when creating a new record or scrolling records although...

I also have a second form that I am using to populate fields in the main
form. (to create new records) When the value is written to the
cbo_MeetingType it appears there but the text boxes do not become visible.
WHY??

Below is the code in the second form that writes to the main form.

Forms!frm_schedules!cbo_MeetingType = txb_MeetingType.Value

Maybe there is a better way.
Any help is appreciated. Thanks
 
S

Stewart Tanner

Jeff,

after your line

Forms!frm_schedules!cbo_MeetingType = txb_MeetingType.Value
either call the Forms!frm_schedules oncurrent event or replicate your code
to set the visible property
 
J

Jeff

How do I call the on current event?

Stewart Tanner said:
Jeff,

after your line

Forms!frm_schedules!cbo_MeetingType = txb_MeetingType.Value
either call the Forms!frm_schedules oncurrent event or replicate your code
to set the visible property
 
S

Stewart Tanner

make sure that it is Public Sub Form_onCurrent

then from your second form after line
Forms!frm_schedules!cbo_MeetingType = txb_MeetingType.Value
Forms!frm_schedules.Form_onCurrent
 

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