Solved

Access 2010 Query

Posted on 2012-04-03
3
504 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
3 Comments
 
LVL 9

Accepted Solution

by:
suvmitra earned 500 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 39

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now