Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...What you have done for people like me is immeasurably helpful."

Geography

Where in the world do Tek-Tips members come from?
h2mhd (Programmer)
15 Jun 12 8:42
Hi

i have a report with thoses fields:

- date
- item
- description
- qty
- price
- sub total

what i want to do is when we enter a descrition with no quantity or quantity =0, i just want to hide the field qty, price, sub total.

i try it but when i hide those fields the entire fields are hidden so i didnt see the lines with a quantity > 0 and sub total on my printed invoice

is there someone who can help me find a way to do that?

thanks a lot

dhookom (Programmer)
15 Jun 12 10:24
How did you "try it"? Did you try conditional formatting or code or macro?

I would probably use code in the On Format event of the section of the report containing the controls.

Duane
Hook'D on Access
MS Access MVP

h2mhd (Programmer)
22 Jun 12 16:10
hi dhookom

thanks for your response

heres what i tried:

Private Sub Détail_Print(Cancel As Integer, PrintCount As Integer)
On Error Resume Next
PageSum = PageSum + Me.subtotal
if me.subtotal = 0 then
me.qte.visible=false
me.price.visible=false
me.souttotal.visible=false
End Sub

the problem is when i hide a field it hides all the lines even if the subtotal is greater than 0

i really dont know how to do that??

do you have a trick for me?

Thanks a lot
dhookom (Programmer)
22 Jun 12 16:35
You don't have any code that sets the controls back to visible. You are also missing "End If".

Try code like:

CODE

Me.qte.visible = Me.Subtotal <> 0
Me.price.visible = Me.Subtotal <> 0
Me.souttotal.visible = Me.Subtotal <> 0

Duane
Hook'D on Access
MS Access MVP

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close