Checkboxes Option Group Questions

Z

zufie

1)I have an Option Group for two checkboxes on a form (ChckIBCCP &
ChckOtherReferral).
Clicking on ChckOtherReferral highlights other checkboxes on the form
as I changed the VBA to do.

However, When I check EITHER checkbox in the Option Group I a CHECK
does not show in the column for that respective field in the table
behind the form.
That is, normally when I have checkboxes on a form & when I check the
checkbox this check shows in the table behind the form.

Is my problem that I must have a QUERY not a table behind the form?

2)Secondly, I have DATE TO and DATE FROM that will return records
within a specified data range.

Instead, when I enter a date range ALL the records are returned which
is NOT correct.

The DATE TO and DATE FROM implies that I must have a query behind the
form, correct?

Sorry if this all seems obvious,

John
 
T

tina

comments inline.

zufie said:
1)I have an Option Group for two checkboxes on a form (ChckIBCCP &
ChckOtherReferral).
Clicking on ChckOtherReferral highlights other checkboxes on the form
as I changed the VBA to do.

However, When I check EITHER checkbox in the Option Group I a CHECK
does not show in the column for that respective field in the table
behind the form.
That is, normally when I have checkboxes on a form & when I check the
checkbox this check shows in the table behind the form.

then i'd say that "normally" your form checkboxes are stand-alone controls
that are bound to specific fields in the form's underlying RecordSource.
Is my problem that I must have a QUERY not a table behind the form?

no. the problem is that when you have options (checkboxes, radio buttons, or
toggle buttons) in an option group, those individual controls cannot be
bound to a field. only the option group control itself can be bound to a
field, and the value of the control is equal to the value of the single
option chosen in that group.

if you want those two checkboxes to write to two fields in the form's
RecordSource, you'll either have to use stand-alone checkboxes, or write
code to set the value of the fields according to which option is selected in
that group.
2)Secondly, I have DATE TO and DATE FROM that will return records
within a specified data range.

Instead, when I enter a date range ALL the records are returned which
is NOT correct.

The DATE TO and DATE FROM implies that I must have a query behind the
form, correct?

not necessarily. you *can* write a query that uses the date controls on the
form as criteria, as

Between Forms!FormName!DATETO And Forms!FormName!DATEFROM

that will return only the records that meet the criteria, to populate the
form. using the criteria above, the form will return no records when it is
first opened; the user must enter the dates, then click a button to requery
the form.

or, you can use those form controls to apply a filter to the form's
recordset, which can be a query or a table. when the form opens all records
will be returned; again, the user enters dates, then clicks a button to
apply the filter.

in case i'm not being clear, in both instances you'll need to add a command
button to the form with appropriate code behind it, for the user to click.

hth
 

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