Report.RecordSource not working in Access 2003 ??

C

Christophe Niel

Hi all

I have a old acc97 DB wich was using a function like this

Private Sub Report_Open()
dim MyQueryName as String
MyQueryName = Dynamicstuff
Me.RecordSource = MyQueryName
End Sub

the point was to have the report dynamically change depending on the user
using the database, but that's beside the point.

In the report, Fields from the querydef defined by "MyQueryName" were used
successfully in access 97.
There are also subReport using the father/child field properties, also using
fields from this dynamically assigned query.

After converting the database to access2003, everytime I run the report, I
have input box asking me to input the data for the fields normally filled
with the result of the query.

I have to click cancel for each field once, or OK for each fields of each
generated pages...

What can I do? I could only find a few articles on "RecordSource" but they
don't describe my problem.

Thanks in advance for helping.

Christophe Niel
 
D

dbahooker

..recordsource?

yeah.. it's not stable enough to carry water; i would avoid it like the
plague

rowsource
controlsource

just so simple bound stuff in access; it's about 3 times as quick to
develop as normal real vb-- and it runs just as fast on todays 3-ghz
machines
 
V

Van T. Dinh

Works fine for me using Windows XP and Access 2003 fully patched (SP2 for
Access).

Have you applied all Service Releases / Service Patches to your OS & Access
 
D

dbahooker

works fine ONCE or it works fine RELIABLY?

i can crash access doing just about any single operation using
..recordsource
it's always been a sore point for me.

you take your ADO recordset

oh gosh.. im sorry-- you're talking about recordsource not recordset
silly me

sorry
 
C

Christophe Niel

Yes, I'm up to date (I'm using WSus to keep all my computers updated and a
"Office Update" said I was up to date)
 
V

Van T. Dinh

Did you check the Parameter names in the dialogs and the names are *exactly*
the same as the Field names in the RecordSource?

Check the Report's Sorting and Grouping, Filter Property, Order By Property
for references to the Parameter names.
 
D

dbahooker

i personally dont ever use parameters; i would just use code to set the
..recordsource to "EXEC mySprocName 132, 'Aaron', TRUE, 1234"

you know what i mean?
i mean-- you have a LOT more control when you set it programmatically

i mean-- it's one line of code.. i do this back and forth without
thinking about it; i mean 100 times a day

strSql = "EXEC mySprocName " & me.chooseType & ", 'Aaron', TRUE, 1234"
Me.RecordSource = strSql
 
D

dbahooker

and you should give us more information on your names of objects and
all that-- i mean-- just give us a half-page of code it wont kill us
 

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