Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / June 2005

Tip: Looking for answers? Try searching our database.

Populating MS Access Report from VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shirley Gilreath - 27 Jun 2005 15:03 GMT
I am trying to create a MS Access report using VBA to access data from a SQL
Server table and a DB2 table.  Both tables contain varchar data that I want
to appear on the report.  When I try linking the table, Access does not like
the DB2 varchar data.  The VBA method was suggested as the most efficient.

I can get the query to bring back data from SQL Server in VBA but I can't
seem to get the data to populate the text boxes on the report.  I keep
getting an error when I use this code:

Me.ErrorType = rst!ErrorType

What am I doing wrong?  Any help would be appreciated.

Signature

Thanks
Shirley

Alex Dybenko - 27 Jun 2005 17:13 GMT
Hi,
What error you get?
try to use textbox name other that field name, if report bound to same table
this can cause a conflict

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

>I am trying to create a MS Access report using VBA to access data from a
>SQL
[quoted text clipped - 11 lines]
>
> What am I doing wrong?  Any help would be appreciated.
Shirley Gilreath - 27 Jun 2005 18:10 GMT
The error I get is "Run-time error '-2147352567 (80020009)' You cannot assign
a value to this object".  I do not have the report bound to any table or
query.  Nor is any control bound to any fields or queries.

Thanks for your help.
Signature

Thanks
Shirley

> Hi,
> What error you get?
[quoted text clipped - 16 lines]
> >
> > What am I doing wrong?  Any help would be appreciated.
Alex Dybenko - 27 Jun 2005 18:59 GMT
Try the Me!ErrorType=rst!Me.ErrorType
perhaps ErrorType is a reserved word

Alex

> The error I get is "Run-time error '-2147352567 (80020009)' You cannot
> assign
[quoted text clipped - 26 lines]
>> >
>> > What am I doing wrong?  Any help would be appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.