Where do I place a statement to,"Code the Detail Format event?"

S

Sony

These are the directions I recieved to generate a check mark, "+" or "-" in a
report, based upon conditions:
You won't be able to do this using one text control.
A text control can only be in one fontstyle.

So, add an unbound control to your report.
Set it's control source to:
=IIf([FormControl]<56,"-",IIf([SomeControl]>76,"+","")
Name this control "PlusMinus".

Add another unbound control to the report.
Set it's Font to Wingdings.
Set it's control source to
=Chr(253)
Make it Not Visible
Name this control "MyCheck"
Place it directly over the other control so it will print in the
correct position.
Size both control's to whatever size you want.

Code the Detail Format event:
MyCheck.Visible = [SomeControl]>56 and [SomeControl]<76

Only a -, +, or Check mark will print.
 
F

fredg

These are the directions I recieved to generate a check mark, "+" or "-" in a
report, based upon conditions:
You won't be able to do this using one text control.
A text control can only be in one fontstyle.

So, add an unbound control to your report.
Set it's control source to:
=IIf([FormControl]<56,"-",IIf([SomeControl]>76,"+","")
Name this control "PlusMinus".

Add another unbound control to the report.
Set it's Font to Wingdings.
Set it's control source to
=Chr(253)
Make it Not Visible
Name this control "MyCheck"
Place it directly over the other control so it will print in the
correct position.
Size both control's to whatever size you want.

Code the Detail Format event:
MyCheck.Visible = [SomeControl]>56 and [SomeControl]<76

Only a -, +, or Check mark will print.

Open the report in Design View.
Right-click in the Detail Section.
Select Properties.
Click on the Event tab.
On the Format event line, write:
[Event Procedure]
Then click on the little button with the 3 dots that appears on that
line.
When the code window opens the cursor will be flashing between 2
already existing lines of code.
Between those 2 lines, write the code.
Change [SomeControl] to the name of the control you are using as
criteria.
 
Top