Use a pass-through query to get the data, and bind the query to the report.
While newer versions of Access will let you set the recordsource to a
recordset, Access 97 doesn't have that capability.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"hommer" <(E-Mail Removed)> wrote in message
news:8FAAD4C6-BD28-4845-BFEF-(E-Mail Removed)...
> Thank you for your reply!
>
> When I got the data back as a recordset in DAO, what is the best practice
on
> binding them to a report in ac97?
>
> "Douglas J Steele" wrote:
>
> > As far as I know, it's not possible to do what you're trying to do.
> >
> > You can use DAO to communicate with SQL Server.
> >
> > --
> > Doug Steele, Microsoft Access MVP
> > http://I.Am/DougSteele
> > (no e-mails, please!)
> >
> >
> > "hommer" <(E-Mail Removed)> wrote in message
> > news:9DF26382-B19E-484A-958C-(E-Mail Removed)...
> > > Hi, everybody!
> > >
> > > I know ac97 does not provide direct binding of an ado rs to a report.
I
> > want
> > > to do it manually.
> > > I have a form with a textbox and a button. On the button click event,
I
> > > passed the text box value to sql server and got a ado rs back.
> > > My question is, am I able to pass the rs into the report, and in
report's
> > > open event wire up field by field like this
> > > me!txtName.ControlSource = rs.fields("CustName")
> > > ...
> > > Or do the data mapping in my form?
> > >
> > > After all, is it possible to code this way? Any sample?
> > >
> > > Thanks!
> > >
> >
> >
> >