Solved

Access 2010 Query

Posted on 2012-04-03
3
506 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 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
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…

830 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