Tick box -> text elsewhere in the table?

K

Kiwi Steve

I have a table with tick boxes for selecting which size category a member
belongs to, and want to automatically convert the tick into a subscription
fee, subs being determined according to the size category.

I've set up a separate table with the categories and subscription fees, but
can't work out how to link them - I want my table to check which box is
ticked, refer to the other table to match this with a subscription fee, then
feed this back into a cell in the original table Does this make sense, or is
this a stupid way to go about this?

If this does make sense, can anyone suggest how to make this work?

Apologies for my ineptitude!

Steve
 
S

strive4peace

Hi Steve,

Using checkboxes to simplify data entry for the user should
not correlate to the way that the data is STORED.

For correlating different subforms to a size, you can define
a calculated field that represents the category for the size
and use that calculated field in LinkMasterFields.

How many checkboxes do you have? You could put them into an
Option Frame and use the AfterUpdate event of the frame to
change your data.

For displaying data, use the form OnCurrent event to check
the appropriate checkbox.

You may find it easier to use Option Buttons in an option
frame as they can have values like 1,2,3,4, etc and your
frame is the value of the option button that is chosen or it
is null if no option has been chosen.

Warm Regards,
Crystal
MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)
 
J

John Vinson

I have a table with tick boxes for selecting which size category a member
belongs to, and want to automatically convert the tick into a subscription
fee, subs being determined according to the size category.

No. You have a Table with a Yes/No field, which has the value -1 for
Yes and 0 for No. It may be *DISPLAYED* as a checkbox control, but
that has nothing to do with the table contents.

And you cannot "convert the tick into a fee" though you can create a
Query which uses the value stored in the yes/no field to do so.
I've set up a separate table with the categories and subscription fees, but
can't work out how to link them - I want my table to check which box is
ticked, refer to the other table to match this with a subscription fee, then
feed this back into a cell in the original table Does this make sense, or is
this a stupid way to go about this?

How can you tell - based on the value in the yes/no field, or other
values in the record - which record in the fee table should be used?
If this does make sense, can anyone suggest how to make this work?

It SOUNDS like you have committed the common mistake of people new to
Access: storing data in fieldnames. If you have six checkbox fields in
each record, one for each type of fee, your table design is incorrect.

If this is the case, use two tables in a one to many relationship:

Members
MemberID <primary key>
LastName
FirstName
<other bio information>
CategoryID <link to Categories>

Categories
CategoryID
Description
Fee


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top