From-subform

  • Thread starter Thread starter Jean-Paul
  • Start date Start date
J

Jean-Paul

Hi
I have a form OD_Situatie
This form has 1 subform named sub4

Upon opening this form I want to be able to set the recordset of the
subform.

I can not find the correct syntax to point to the recordset of the subform.

I thought sabout something like:

[Forms]![OD_Situatie]!Sub4.Recordset = "whatever SQL"
 
Jean-Paul said:
I have a form OD_Situatie
This form has 1 subform named sub4

Upon opening this form I want to be able to set the recordset of the
subform.

I can not find the correct syntax to point to the recordset of the subform.

I thought sabout something like:

[Forms]![OD_Situatie]!Sub4.Recordset = "whatever SQL"


If you want to set a form's recordset, then you would have
to set it to an open recordset object variable. It looks
more like you want to set the form's RecordSource property
to an SQL statement. If so, it could be:

Me.Sub4.Form.RecordSource = "whatever SQL"
 
it turned out to be:

Me!Sub4.Form.RecordSource = SQL_Commando_2

Thanks

Marshall said:
Jean-Paul said:
I have a form OD_Situatie
This form has 1 subform named sub4

Upon opening this form I want to be able to set the recordset of the
subform.

I can not find the correct syntax to point to the recordset of the subform.

I thought sabout something like:

[Forms]![OD_Situatie]!Sub4.Recordset = "whatever SQL"


If you want to set a form's recordset, then you would have
to set it to an open recordset object variable. It looks
more like you want to set the form's RecordSource property
to an SQL statement. If so, it could be:

Me.Sub4.Form.RecordSource = "whatever SQL"
 
Back
Top