Solved

Access 2010 Query

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article will show you how to use shortcut menus in the Access run-time environment.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
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…

758 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

22 Experts available now in Live!

Get 1:1 Help Now