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 / Reports / Printing / January 2007

Tip: Looking for answers? Try searching our database.

Syntax to change Control Source for a Report Field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kahuna - 29 Jan 2007 15:33 GMT
Hi Folks - as usual - pulling my hair out!!

I have a report based on a query, and I am trying to change the control
source of a specific field on the report to one or other of the query result
fields, dependant on other criteria. Been 'round the houses' numerous times
now with this, but keep getting the error that the 'Field' cant be found.

Using Select Case here's where I am at (its in OnOpen):
'***************************
Dim SelectedScenario As String

SelectedScenario = DLookup("[ss_selected_scenario]", "system_settings",
"[ss_selected_scenario] = True")

Select Case SelectedScenario

Case 1

   Me!ex_calculation_factor = [bs_extent_used] ' Here's the error

End Select
'***************************
Tried numerous syntax to refer to the field and get either and Object error,
or the mentioned 'cant find the field' error.

Tried this in OnFormat too but the error said I couldn't change the record
source once the report was open!

Suggestions appreciated.
Kahuna - 29 Jan 2007 16:04 GMT
Thanks folk got it ...

Me!ex_calculation_factor.ControlSource = "bs_extent_used"

Trial and error - takes time but works wonders!

> Hi Folks - as usual - pulling my hair out!!
>
[quoted text clipped - 26 lines]
>
> Suggestions 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.