Making text boxes visible with a combobox

  • Thread starter Thread starter Jeff
  • Start date Start date
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
 
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
 
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
 
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
 
Back
Top