Add checkbox to every record of a continuous form

G

Guest

I need to add a checkbox to each detail section of a continuous form. The
checkbox needs to be enabled or not depending on the value of a source field.
I need to collect the selected checkboxes into the source data.
A "select all" button in the footer section would be a plus.
I suppose I need to build it with some VBA code?

thanks for any suggestions!

Peter
 
R

Rick B

You need to add a checkbox field to your table and then include it in the
form just like any other field.

To collect the checked items, just create a query that selects all records
where the new field is true.

To select all, you would need to use some type of code.
 
G

Guest

Thanks Rick but it's not that easy. The checkbox has to be enabled or not
depending on a source value at the opening of the form.

The collecting of the result is not a big deal.

Peter
 
G

Guest

First, create a Select query based on the table that is the recordsource for
your form. Add a field to it with a condition that will result in true or
false:
Example:
MyField: [FIELD_ONE] > [FIELD_TWO]
Then make the query the recordsource for your form and make the contorl
source for the added field a check box.
 
G

Guest

Klatuu,

I think I explain it wrong. I need them to use the checkbox to select the
record. But I have to make sure they cannot select it if a condition is not
met. It's like selecting to send a message to someone who does not have an
adress.

Thanks,

Peter

Klatuu said:
First, create a Select query based on the table that is the recordsource for
your form. Add a field to it with a condition that will result in true or
false:
Example:
MyField: [FIELD_ONE] > [FIELD_TWO]
Then make the query the recordsource for your form and make the contorl
source for the added field a check box.

Peter said:
Thanks Rick but it's not that easy. The checkbox has to be enabled or not
depending on a source value at the opening of the form.

The collecting of the result is not a big deal.

Peter
 
G

Guest

Peter,
Okay, I get it. However, the question is, when you open the form, do you
want to show all records in the table, or just those from which the user may
select?

Peter said:
Klatuu,

I think I explain it wrong. I need them to use the checkbox to select the
record. But I have to make sure they cannot select it if a condition is not
met. It's like selecting to send a message to someone who does not have an
adress.

Thanks,

Peter

Klatuu said:
First, create a Select query based on the table that is the recordsource for
your form. Add a field to it with a condition that will result in true or
false:
Example:
MyField: [FIELD_ONE] > [FIELD_TWO]
Then make the query the recordsource for your form and make the contorl
source for the added field a check box.

Peter said:
Thanks Rick but it's not that easy. The checkbox has to be enabled or not
depending on a source value at the opening of the form.

The collecting of the result is not a big deal.

Peter

:

You need to add a checkbox field to your table and then include it in the
form just like any other field.

To collect the checked items, just create a query that selects all records
where the new field is true.

To select all, you would need to use some type of code.

--
Rick B



I need to add a checkbox to each detail section of a continuous form. The
checkbox needs to be enabled or not depending on the value of a source
field.
I need to collect the selected checkboxes into the source data.
A "select all" button in the footer section would be a plus.
I suppose I need to build it with some VBA code?

thanks for any suggestions!

Peter
 
G

Guest

No, I surely want to display all. The operator has to see the some are not
selectable. For that reason I want to show all records but some with
checkboxes that are not enabled.

Thanks,

Peter

Klatuu said:
Peter,
Okay, I get it. However, the question is, when you open the form, do you
want to show all records in the table, or just those from which the user may
select?

Peter said:
Klatuu,

I think I explain it wrong. I need them to use the checkbox to select the
record. But I have to make sure they cannot select it if a condition is not
met. It's like selecting to send a message to someone who does not have an
adress.

Thanks,

Peter

Klatuu said:
First, create a Select query based on the table that is the recordsource for
your form. Add a field to it with a condition that will result in true or
false:
Example:
MyField: [FIELD_ONE] > [FIELD_TWO]
Then make the query the recordsource for your form and make the contorl
source for the added field a check box.

:

Thanks Rick but it's not that easy. The checkbox has to be enabled or not
depending on a source value at the opening of the form.

The collecting of the result is not a big deal.

Peter

:

You need to add a checkbox field to your table and then include it in the
form just like any other field.

To collect the checked items, just create a query that selects all records
where the new field is true.

To select all, you would need to use some type of code.

--
Rick B



I need to add a checkbox to each detail section of a continuous form. The
checkbox needs to be enabled or not depending on the value of a source
field.
I need to collect the selected checkboxes into the source data.
A "select all" button in the footer section would be a plus.
I suppose I need to build it with some VBA code?

thanks for any suggestions!

Peter
 
G

Guest

Okay, I think what you will need will be a formula to determine whether the
condition is met and put it in the Current event.

Me.MyCheckbox.Enabled = IIf(Condition, True, False)

Peter said:
No, I surely want to display all. The operator has to see the some are not
selectable. For that reason I want to show all records but some with
checkboxes that are not enabled.

Thanks,

Peter

Klatuu said:
Peter,
Okay, I get it. However, the question is, when you open the form, do you
want to show all records in the table, or just those from which the user may
select?

Peter said:
Klatuu,

I think I explain it wrong. I need them to use the checkbox to select the
record. But I have to make sure they cannot select it if a condition is not
met. It's like selecting to send a message to someone who does not have an
adress.

Thanks,

Peter

:

First, create a Select query based on the table that is the recordsource for
your form. Add a field to it with a condition that will result in true or
false:
Example:
MyField: [FIELD_ONE] > [FIELD_TWO]
Then make the query the recordsource for your form and make the contorl
source for the added field a check box.

:

Thanks Rick but it's not that easy. The checkbox has to be enabled or not
depending on a source value at the opening of the form.

The collecting of the result is not a big deal.

Peter

:

You need to add a checkbox field to your table and then include it in the
form just like any other field.

To collect the checked items, just create a query that selects all records
where the new field is true.

To select all, you would need to use some type of code.

--
Rick B



I need to add a checkbox to each detail section of a continuous form. The
checkbox needs to be enabled or not depending on the value of a source
field.
I need to collect the selected checkboxes into the source data.
A "select all" button in the footer section would be a plus.
I suppose I need to build it with some VBA code?

thanks for any suggestions!

Peter
 
G

Guest

Thanks Klatuu, I wasn't aware of the Current event.

Peter

Klatuu said:
Okay, I think what you will need will be a formula to determine whether the
condition is met and put it in the Current event.

Me.MyCheckbox.Enabled = IIf(Condition, True, False)

Peter said:
No, I surely want to display all. The operator has to see the some are not
selectable. For that reason I want to show all records but some with
checkboxes that are not enabled.

Thanks,

Peter

Klatuu said:
Peter,
Okay, I get it. However, the question is, when you open the form, do you
want to show all records in the table, or just those from which the user may
select?

:

Klatuu,

I think I explain it wrong. I need them to use the checkbox to select the
record. But I have to make sure they cannot select it if a condition is not
met. It's like selecting to send a message to someone who does not have an
adress.

Thanks,

Peter

:

First, create a Select query based on the table that is the recordsource for
your form. Add a field to it with a condition that will result in true or
false:
Example:
MyField: [FIELD_ONE] > [FIELD_TWO]
Then make the query the recordsource for your form and make the contorl
source for the added field a check box.

:

Thanks Rick but it's not that easy. The checkbox has to be enabled or not
depending on a source value at the opening of the form.

The collecting of the result is not a big deal.

Peter

:

You need to add a checkbox field to your table and then include it in the
form just like any other field.

To collect the checked items, just create a query that selects all records
where the new field is true.

To select all, you would need to use some type of code.

--
Rick B



I need to add a checkbox to each detail section of a continuous form. The
checkbox needs to be enabled or not depending on the value of a source
field.
I need to collect the selected checkboxes into the source data.
A "select all" button in the footer section would be a plus.
I suppose I need to build it with some VBA code?

thanks for any suggestions!

Peter
 

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