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

Tip: Looking for answers? Try searching our database.

new query in subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bob bob - 14 Feb 2005 05:06 GMT
I have a subform that, on default, gets its data from a query.  When a
button on the main form is clicked, the record source for the subform query
is changed.  

My onclick code is      Forms![main]![sub].Form.RecordSource = "query2"

The problem is that the subform shows no records (even though there
definitely are some that meet the query criteria).  I think I need to
refresh, repaint, or requery either the subfrom or the main form, but I've
tried every combination of those steps that I can think of and the subform
stays empty.  Any ideas?
bob bob - 14 Feb 2005 11:57 GMT
I should mention that the subform is a continuous form.  Also, each of the
two queries being selected by the button on the main form works fine if I
simply enter it by hand in the properties of the subform.  It's only when I
have the recordset change following onclick of a button on the main form
that the subform goes blank.
 
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.