Form recordsource parameter sp change

  • Thread starter Thread starter tomocb
  • Start date Start date
T

tomocb

Tricky one here. Wondering if anyone had any suggestions. I have a form
that has the record source changed depending on where the form is opened
from. So I'm currently leaving the default recordsource, input parameters,
resync, etc as blank.

This is fine but the record source for the subforms within the form are then
asking for one of the parameters that is derived from the main form
recordsource.

Should I set all of the subform recordsource and other values when the form
opens, even though these will never actually change? My recordsource is
obviously a parametised stored procedure btw.

Thanks in advance for any assistance provided.
 
tomocb said:
Tricky one here. Wondering if anyone had any suggestions. I have a form
that has the record source changed depending on where the form is opened
from. So I'm currently leaving the default recordsource, input
parameters,
resync, etc as blank.

This is fine but the record source for the subforms within the form are
then
asking for one of the parameters that is derived from the main form
recordsource.

Should I set all of the subform recordsource and other values when the
form
opens, even though these will never actually change? My recordsource is
obviously a parametised stored procedure btw.

Thanks in advance for any assistance provided.

For cases like that I've used a record source including the same columns as
the intended record source, but with Where 1=0 to prevent any rows being
returned. The subforms see the necessary link fields, but with Null values
so no rows are loaded, and no errors are generated.
 
I just store all the variables in a table, and it's drop dead simple

instead of passing around a bunch of arguments, keep all the variables
in a table.. it's a lot simpler IMO

-Aaron
 
Back
Top