Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Option Group in a Report

Status
Not open for further replies.

pcdaveh

Technical User
Sep 26, 2000
213
US
Is it possible to set the value of an option group in a report in code? Please provide tested code 'caus I tried and it didn't work.
 
You should be able to do it with a simple if statement. I used an unbound text box to display the text itself, but you can use labels, too.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
On Error GoTo ErrorDetail

If me.optYes.value=1 Then
txtAnswer.value="Yes"

Else
txtAnswer.value="No"
End If

ExitDetail:
Exit Sub

ErrorDetail:
MsgBox Err.Description
Resume ExitDetail

End Sub



Linda Adams
Linda Adams/Emory Hackman Official Web site Official web site for actor David Hedison:
 
What your doing is setting the value of the text box based upon what is in the option group. I need to set the option group itself.
 
" ... set the value of an option group in a report ... ".


Makes no sense.

Why would you even HAVE an option group in a report? You (obviously?) cannot directly (e.g. UI) manipulate the value as reports are 'read only' objects.

It SOUNDS like you have simply copied a FORM to a REPORT, and expect the REPORT to behave like the FORM. THAT "ain't gonna happen".

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top