subreport and stored procedure

G

Guest

Hi,

How do I manipulate the recordsource and input parameters in VBA code?

I had been working on code to read stored procedure in SQL Server provide
parameters and fill a subform. I got it to work but it was NOT updateable.

As a proof of concept: I had used the properties pages to provide the sql
stored
procedure name to the recordsource property and a value for an input
parameter.
when I load the form with a subform it automatically loads a recordset that
is updateable, I updated some records and verified it in query analyser.

i played around with setting properties but I get zero records returned.
I think the .requery, .refresh, .repaint might be part of the anwer but
have'nt gotten them to work yet.

thanks
 
G

Guest

I see that this question has gone unanswered for two months. I am new to
user groups, but I think I can help you with this. It sounds like you are
trying to set the RecordSource property of a subform based on selections in a
parent form. From my understanding, you are having trouble making the
subform updatable. The main thing to remember is that your SQL source table
must have a primary key to be updatable. If you still need help, give me
some more specifics and I will see what I can do to help you.

Scott
 
G

Guest

Thanks for the reply Scott,

I found the problem a long time ago :), yes it was no primary key set.
Somewhere in the chronology of events of development I had wiped out my
primary key. I sure was frustrated until I tracked it down.
 

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