Weird problem with setting RecordSource and InputParameters in Access 2003 ADP

V

Vassil Velichkov

Hi Guys,

I have the following issue with Access Data Project application
connected to an SQL Server 2000 database:

I have a multi-instance master form with two nested levels of
subforms. The two subforms are used to view respectively a Datasheet
and a Subdatasheet. The RecordSources of the subforms are set to
in-line functions with parameters (e.g. RecordSource = "SELECT * FROM
fnDailyAdditionalInfo(?,?)"). I change the InputParameters property
from the code each time when the master form changes its status by
calling custom functions declared in the subforms. In the subform
functions I use the following reference: Me.InputParameters = ID & ","
& Status _ Me.Requery _ - where ID and Status are function parameters.
It seems to work fine when I check the value of Me.InputParameters in
the Immediate window, but nothing happens with the form. No matter how
I change the property from the code in run-time, in the Properties
window (again shown in run-time) it remains with its old value. The
only way to change it is to set new value manually in the Properties
window in run-time. Prior to that I was trying to build the
RecordSources of the subforms and to set them in VB, but I had the
same problem. The property values change in the oode context when I
debug, but nothing happens with the form. I even tried first to set
the Me.Recordsource to "" and the to the new SQL statement - no
effect.

Any ideas or comments would be higly appreciated - I am working on
this for the last 17 hours and I'd like to kill either myself or
somebody in Microsoft...;-))))

Best Regards,
Vassil Velichkov
 

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