Subform doesn't show until I click on it

P

Pat Backowski

Hi Everyone,

Probably a very siMple, but for me very vexing, question:
I have a form that has a drop down box to select a value and datepicker to
pick a date. The subform doesn't activate until I click on the white space
where it should be. Then everything works fine, including the selection of
data for the subform, based on the values selected on the form.

How do I get the subform to start, and show, automatically after I select
the values in the form?

Many Thanks for your kind help
Pat.
 
S

scubadiver

Use the afterupdate event in the combo.

Forms![Main Form Name]![Subform Name].Visible = True

should work
 
P

Pat Backowski

Hi Scubadiver,

Good Idea, but no cigar:

Private Sub DTPicker4_Updated(Code As Integer)
Forms![Vehicle Check Report]![VehicleChecklist subform].Visible = True

End Sub

No effect. Any other ideas?

Thanks,
Pat.

scubadiver said:
Use the afterupdate event in the combo.

Forms![Main Form Name]![Subform Name].Visible = True

should work

Pat Backowski said:
Hi Everyone,

Probably a very siMple, but for me very vexing, question:
I have a form that has a drop down box to select a value and datepicker to
pick a date. The subform doesn't activate until I click on the white space
where it should be. Then everything works fine, including the selection of
data for the subform, based on the values selected on the form.

How do I get the subform to start, and show, automatically after I select
the values in the form?

Many Thanks for your kind help
Pat.
 
S

scubadiver

I think it should be


Private Sub DTPicker4_AfterUpdate()

Forms![Vehicle Check Report]![VehicleChecklist subform].Visible = True

End Sub





Pat Backowski said:
Hi Scubadiver,

Good Idea, but no cigar:

Private Sub DTPicker4_Updated(Code As Integer)
Forms![Vehicle Check Report]![VehicleChecklist subform].Visible = True

End Sub

No effect. Any other ideas?

Thanks,
Pat.

scubadiver said:
Use the afterupdate event in the combo.

Forms![Main Form Name]![Subform Name].Visible = True

should work

Pat Backowski said:
Hi Everyone,

Probably a very siMple, but for me very vexing, question:
I have a form that has a drop down box to select a value and datepicker to
pick a date. The subform doesn't activate until I click on the white space
where it should be. Then everything works fine, including the selection of
data for the subform, based on the values selected on the form.

How do I get the subform to start, and show, automatically after I select
the values in the form?

Many Thanks for your kind help
Pat.
 
P

Pat Backowski

No, it doesn't like that at all - fyi, thihs is Acess 2003

scubadiver said:
I think it should be


Private Sub DTPicker4_AfterUpdate()

Forms![Vehicle Check Report]![VehicleChecklist subform].Visible = True

End Sub





Pat Backowski said:
Hi Scubadiver,

Good Idea, but no cigar:

Private Sub DTPicker4_Updated(Code As Integer)
Forms![Vehicle Check Report]![VehicleChecklist subform].Visible = True

End Sub

No effect. Any other ideas?

Thanks,
Pat.

scubadiver said:
Use the afterupdate event in the combo.

Forms![Main Form Name]![Subform Name].Visible = True

should work

:

Hi Everyone,

Probably a very siMple, but for me very vexing, question:
I have a form that has a drop down box to select a value and datepicker to
pick a date. The subform doesn't activate until I click on the white space
where it should be. Then everything works fine, including the selection of
data for the subform, based on the values selected on the form.

How do I get the subform to start, and show, automatically after I select
the values in the form?

Many Thanks for your kind help
Pat.
 
B

BruceM

Try Me.Refresh in the After Update event.

By way of general information, to reference a subform control (the
"container" on the main form in which the subform resides), just use the
control name as you would a text box or any other control:
Me.SubformName.Visible = True

To refer to a value in the subform's record source:
Forms!MainFormName!SubformName.Form!SomeField

Pat Backowski said:
Hi Scubadiver,

Good Idea, but no cigar:

Private Sub DTPicker4_Updated(Code As Integer)
Forms![Vehicle Check Report]![VehicleChecklist subform].Visible = True

End Sub

No effect. Any other ideas?

Thanks,
Pat.

scubadiver said:
Use the afterupdate event in the combo.

Forms![Main Form Name]![Subform Name].Visible = True

should work

Pat Backowski said:
Hi Everyone,

Probably a very siMple, but for me very vexing, question:
I have a form that has a drop down box to select a value and datepicker
to
pick a date. The subform doesn't activate until I click on the white
space
where it should be. Then everything works fine, including the
selection of
data for the subform, based on the values selected on the form.

How do I get the subform to start, and show, automatically after I
select
the values in the form?

Many Thanks for your kind help
Pat.
 
S

scubadiver

ok. I am not familiar with 2003 but afterupdate would have been appropriate
(I would have thought)


Pat Backowski said:
No, it doesn't like that at all - fyi, thihs is Acess 2003

scubadiver said:
I think it should be


Private Sub DTPicker4_AfterUpdate()

Forms![Vehicle Check Report]![VehicleChecklist subform].Visible = True

End Sub





Pat Backowski said:
Hi Scubadiver,

Good Idea, but no cigar:

Private Sub DTPicker4_Updated(Code As Integer)
Forms![Vehicle Check Report]![VehicleChecklist subform].Visible = True

End Sub

No effect. Any other ideas?

Thanks,
Pat.

:


Use the afterupdate event in the combo.

Forms![Main Form Name]![Subform Name].Visible = True

should work

:

Hi Everyone,

Probably a very siMple, but for me very vexing, question:
I have a form that has a drop down box to select a value and datepicker to
pick a date. The subform doesn't activate until I click on the white space
where it should be. Then everything works fine, including the selection of
data for the subform, based on the values selected on the form.

How do I get the subform to start, and show, automatically after I select
the values in the form?

Many Thanks for your kind help
Pat.
 
P

Pat Backowski

Thanks BruceM and Scubadiver!

The problem is that the DatePicker isn't updating until I TAB out of it.

I put a button on the form - it does nothing, but after selecting the date,
if I press the button, the subform shows - maybe due to the
Subform.Visible=True on the updating of the DatePicker, or maybe just
because....

Enough fun for one day - got to get something productive done
Thanks you guys for your kind help
Pat
 
B

BruceM

The After Update is designed to work as you have described (except that
clicking out of the control should work too). Until you leave the control,
the update is still in progress, assuming something in the field has
changed. If there have been no changes to the field's data, there is no
update.
The subform control is visible, otherwise you would not see it as blank. If
it is not visible, you wouldn't see it at all.
Pressing a button on the form has nothing to do the DatePicker control's
After Update event unless the command button calls its After Update event.
 
Top