check box adding records to table

A

andyw

Hi,


I have a form which I have put some check boxes on.


Say each of these checkboxes has a value, option1, option2, option3,
option4.


How can i set up something that when a user ticks the checkboxes the
value is added to the appropiate table.


For exmaple if they click option1 and option2 the data in the table
would read option1;option2


TIA.
 
A

Arvin Meyer

Simply binding the form to the table as a recordsource on the form's
property sheet. And binding each checkbox to a field in the controlsource
property, ought to do it for you. Hopefully, each checkbox has its own
field. If not, rethink your design, as it is poor relational db design to
put multiple data in a single field.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
A

andyw

Do you have a link to example database that demostrates this.

I understand the principles I'm just having trouble getting my head
around how I should be structuring my tables.
Looking at example would help me achieve this.

Thanks.
 
A

andyw

Okay, I've kind of got it, although no matter what values I set the
tables always get populated with either a '0' or '-1'
Any idea's how I fix this ?

Thanks again.
 
M

Mike Labosh

Okay, I've kind of got it, although no matter what values I set the
tables always get populated with either a '0' or '-1'
Any idea's how I fix this ?

A checkbox is a boolean thing. Either checked, or not checked. So the
entered value behind it is either True or False. Access stores this as True
= -1 and False = 0.

To format this for datasheet display, open your table in design view, and
click on the Yes/No field in the field list. Below the field list, is a
Format property which lets you select Yes/No, True/False, Off/On.
--
Peace & happy computing,

Mike Labosh, MCSD

"It's 4:30 am. Do you know where your stack pointer is?"
 

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

Similar Threads


Top