Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 2010 Query

Posted on 2012-04-03
3
Medium Priority
?
513 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

971 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