Senin, 22 Februari 2016

RE: [MS_AccessPros] Setting Value of Text Box



Your answer trigger my memory.  I changed to a text box on as the control source on the form and used    Column (1) as the source of the text box on the report.


Worked perfect.






From: []
Sent: Saturday, February 20, 2016 4:36 AM
Subject: Re: [MS_AccessPros] Setting Value of Text Box





I assume the form is open while the report runs.  If so, then you can set the Control Source of the text box to:


=Choose([Forms]![f_TeamTournamentSetup]![OptBoxTournamentName], "Champions", "Huskies")


John Viescas, Author

Microsoft Access 2010 Inside Out

Microsoft Access 2007 Inside Out

Microsoft Access 2003 Inside Out

Building Microsoft Access Applications 

SQL Queries for Mere Mortals 

(Paris, France)




On Feb 20, 2016, at 6:47 AM, Bill Singer [MS_Access_Professionals] <> wrote:



I am attempting to set the value of a Text box on a report based on the value of an Options Box.

Below is my attempt that is not working. 


the options box has two valued 1=Champions, 2 = Huskies




Private Sub Report_Load()
   If Forms!f_TeamTournamentSetup!OptBoxTournamentName = 1 Then Me.txtChampions = "Champions"
   ElseIf Forms!f_TeamTournamentSetup!OptBoxTournamentName = 2 Then Me.txtChampions = "Huskies"
   Else: Me.txtChampions = ""




Is this even close to how this should be done?   Any idea what is wrong with my code?




Minnesota, at Mall of America






Posted by: "Bill Singer" <>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1130)



Tidak ada komentar:

Posting Komentar