Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access 2010 Query

Posted on 2012-04-03
3
Medium Priority
?
511 Views
Last Modified: 2012-04-04
Hello again,

I have a form with checkboxes, each time a check box is checked a dollar value needs to be associated with that check. Example: Car wash y/n, (if yes,  is checked the default value is $5.00)

I need to pull a report that shows for example: Car washes 3 total $15.00.

My table has the fields :

Car Wash y/n field
Car Wash Cost 5.00 Currency field (the 5.00 amount is fixed, never changes)

at this point I am only using the check fields on the form...because I can't figure out where or how to add the Car Wash Cost...so my report only shows the amount of car washed...but no dollar values.

Please help,

Thanks much,

Lucy
0
Comment
Question by:lucyLuna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Accepted Solution

by:
suvmitra earned 2000 total points
ID: 37804650
You need VBA and SQL to perform this.

AfterUpdate EVent of the Checkbox

If me.checkbox1 = true then
me.txtbox1.value = 5 [Add a unbound text box to populate the value you may add a lable to show the Dollar sign ]
end if

When you click on Save button one SQL should trigger to Inser or Update the records in the DB.

INSERT INTO tblA Values ("Car Wash", 5)
0
 
LVL 40

Expert Comment

by:als315
ID: 37804664
May be you can upload sample from your DB?
How are stored these records? If you have 3 Car washes, you have 3 records in your DB?
You can add field on your form with following (Boolean values are: Yes = -1, No = 0) :
=-[Car Wash Cost]*[Car Wash]
0
 

Author Closing Comment

by:lucyLuna
ID: 37804794
Thank you so much....you helped me tremendously!
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question