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 / March 2005

Tip: Looking for answers? Try searching our database.

Newly created Views not visible to Access until after pressed F5

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve'o - 14 Mar 2005 15:03 GMT
Server = SQL Server 2000 SP3a
Client = Access 2000 SP3 data project

I have a button on a form which when clicked creates a view based on the
users selections, then opens a report who's recordsource is the newly created
view.  

The name of the view contains the username, so its specific.  The problem is
when the report opens it fails with:
"The record source 'vw_myusername_report' specified on this form or report
does not exist"
I think the reason is because the database window has not been refreshed,
the access client cannot see the newly created view.  If I press F5 when
looking at the Views section of the database window, this refreshed it to
show the new view, and then the report works fine.

I can't predict who will be using the system, so would like for it to be
seemless, so I tried adding into the onOpen of the report
Application.RefreshDatabaseWindow
I  also tried adding that to the docmd.openreport() on the onClick on the
button on the form, bu no joy.  It does not refresh the window.  But F5
works.  But I do not want the database window to be visible to the user, and
it should be automatic.

Anyone else come accross this, or would have some suggestions  as to how to
proceed?

Many thanks for any suggestions!
JaRa - 14 Mar 2005 16:21 GMT
Hi,

I'm not sure but can this do the trick for you?

Application.RefreshDatabaseWindow()

- Raoul

> Server = SQL Server 2000 SP3a
> Client = Access 2000 SP3 data project
[quoted text clipped - 24 lines]
>
> Many thanks for any suggestions!
Steve'o - 15 Mar 2005 11:39 GMT
I did mention that I had tried this, but unfortunately it did not work.

What I've done is to use a sproc as the recordsource, and this simply
selects everything from the view vw_username.
Which is probably a better way anyway, as I can alter the sproc and it
effects everyone immediately, rather than having to send out another front
end (.adp) if any change was made to the client app.

> Hi,
>
[quoted text clipped - 32 lines]
> >
> > Many thanks for any suggestions!
 
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.