473,416 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Linking Checkboxes to values in a table for a Report

I have a table that contains 20 checkbox fields. Each checkbox
corrisponds to an Score amount.

For Example:

Checkbox1 is worth 10 points
Checkbox2 is worth 5 points
Checkbox3 is worth 2 points
Checkbox4 is worth 3 points

The report I run has these score values hard coded within the query.
For Example: IIF([Checkbox1]=Yes,10,0)
If the checkbox is checked they get 10 points. If not they get zero
points

A report is then easily generated showing how many points a person
scored on a test.

PROBLEM:
I want the user to be able to change the score values of each Checkbox.
Today Checkbox1 is worth 10 points BUT tomorrow I want to make it worth
20 points. Hardcoding the values is not an option in this case.

What would the best way to do this be? Can I create a table with these
point values in them. If so how would I link it back to the original
data holding table?
Example:
tblScore

Checkbox Score Desc Point Value
Checkbox1 Name Entered 10
Checkbox2 Paper Filled 5

Thanks for any help you can provide

Dec 9 '05 #1
4 2353
On 9 Dec 2005 08:45:02 -0800, sc********@gmail.com wrote:
I have a table that contains 20 checkbox fields. Each checkbox
corrisponds to an Score amount.

For Example:

Checkbox1 is worth 10 points
Checkbox2 is worth 5 points
Checkbox3 is worth 2 points
Checkbox4 is worth 3 points

The report I run has these score values hard coded within the query.
For Example: IIF([Checkbox1]=Yes,10,0)
If the checkbox is checked they get 10 points. If not they get zero
points

A report is then easily generated showing how many points a person
scored on a test.

PROBLEM:
I want the user to be able to change the score values of each Checkbox.
Today Checkbox1 is worth 10 points BUT tomorrow I want to make it worth
20 points. Hardcoding the values is not an option in this case.

What would the best way to do this be? Can I create a table with these
point values in them. If so how would I link it back to the original
data holding table?
Example:
tblScore

Checkbox Score Desc Point Value
Checkbox1 Name Entered 10
Checkbox2 Paper Filled 5

Thanks for any help you can provide


There are lots of ways of doing this. In order to opine on the method
that might be least intrusive, I think more information is necessary.
Like the actual query you are using. Is it the recordsource for the
report or is it the controlsource for a textbox (or series of
textboxes) on a report.

Another way might be to use the Tag of each checkbox to store a value
and then access that value in your query.

Is the form open when the report is run? If so, you can set up a
parameter query and then set each parameter in vba with a simple loop
before executing the query and then use that results of that query as
your input into the report.

Hardcoding, in general, is bad.

So, fill in more details as to what is going on and maybe somebody
will have more detailed help.

mike
Dec 9 '05 #2
Thanks for your reply Mike

The query is the record source for the report currently. The report
runs directly from it. A parameter report sounds interesting but
wouldn't that take a great deal of time to enter all 20 values?
Currently this report is run every day and I'm not sure if my users
would want to spend the time entering parameters.

I'm afraid I am not familiar with what a Tag is. Though after looking
it up in Help it sounds like it might do the trick. I'll give it a try
and see if I can make it work.

Thanks again

Dec 9 '05 #3
HELP! After a few tries to set a TAG I seem to have failed.

I have created a macro that runs when a button is clicked on the same
form that the checkbox exists on.
The Macro uses the "SetValue" action. In the Item field I entered the
following. I'm not 100% sure the syntext is correct though:
[Forms]![Auditor's Input Form2]![Score01].[Tag]="10"

My assumption was that when I looked at the tag property of the
[Score01] checkbox that I would see 10 listed. Is this an incorrect
assumption?

Am I setting the tag value correctly?
Any help is greatly appreciated.

Dec 10 '05 #4
On 9 Dec 2005 16:22:20 -0800, sc********@gmail.com wrote:
HELP! After a few tries to set a TAG I seem to have failed.

I have created a macro that runs when a button is clicked on the same
form that the checkbox exists on.
The Macro uses the "SetValue" action. In the Item field I entered the
following. I'm not 100% sure the syntext is correct though:
[Forms]![Auditor's Input Form2]![Score01].[Tag]="10"

My assumption was that when I looked at the tag property of the
[Score01] checkbox that I would see 10 listed. Is this an incorrect
assumption?

Am I setting the tag value correctly?


Looks like it to me.

Not being familiar with macro's, though, I won't be able to test your
theories. If you did it in VBA, you could put a STOP command right
after the tag is set and then enter the immediate window (by typing
cntl-G) and then typing:

? [Forms]![Auditor's Input Form2]![Score01].[Tag]

and seeing what pops up.

Either switch to VBA, or somebody else will have to help from here on
out!

mike
Dec 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Frank Collins | last post by:
Can anyone point me to some good examples on the web of using values from dynamically created checkboxes on forms in ASP, particularly relating to INSERTING those values into a SQL or Access...
5
by: Deborah V. Gardner | last post by:
I would like to use "Yes" and "No" checkboxes on a subform. The problem is that when I click the Yes checkbox on the subform, all of the checkboxes are checked. Currently, I have a field...
2
by: Incolor | last post by:
Hello All! I have to generate a checklist form as an input form in Access. A paper form is taken out in the field and checked yes, no, OR n/a for each item inspected. The problem I am having is...
3
by: Robert McEuen | last post by:
Using A2K3, Windows XP I'm handling a many-to-many relationship with a linking table structure as follows (irrelevant fields omitted): tblIssue PK_IssueID (autonumber, primary key) IssueName...
0
by: krokador | last post by:
This is doing my head in... We're starting to migrate our report-printing and such (forms included) to pdf - using xml files and nFOP with asp.net. In this case I have to print out a form which...
7
by: harikap | last post by:
hi , here im using vb.net 2005how can i add radiobuttons as column to windows datagridview control plz help me....
2
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography...
14
by: zufie | last post by:
I have to create a QA report regarding callers calling into a phone hotline. The report consists of many checkboxes such as: Did the IBCCP agency contact you? Yes/NO How many days passed...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.