Re: Query regarding the Check Box field



In article <BEEEE6BB.8297%nick@xxxxxxxxxxx>, Nick Marshall
<nick@xxxxxxxxxxx> wrote:
>
> I am trying to display a number of results from a Case command in a Check
> Box field and I¹m experiencing some problems.
>
> What I want to happen is when a date is entered into a field (sampledate_1)
> an ³x² is automatically entered into a Check Box field (called
> results_check) next to the relevant field title. Then, when another date is
> entered into another one of the date fields (sampledate_2), another ³x² is
> marked next to the relevant ³results_check² field, and so on until they¹re
> all checked.
>
> I¹m unsure as to what calculation I will need to use as the Case command
> only seems to display 1 true result at a time.

You could use separate fields for each checkbox, then each is a simple
calculation field:

ResultsCheck_X {Calculation, Text result}
= If (IsEmpty(SampleDate_X), "", "Check")

where "Check" is whatever value the checkbox uses when it's turned "on".


If you want to use one field for all the checkboxes, then you need to
understand how checkbox fields work. A 'checkbox' field is really just
a normal field set to display it's data in a different format - the
field contains each "on" value separated by a Return character. You can
see how they work by duplicating the checkbox field and making it use
"Normal" format, then try turning different checkboxes on and off and
see what is displayed in the normally formatted version.

Getting back to the original problem, to get each value in the
multiple-checkbox field to turn "on" when a date is entered in another
field you could use something like:

ResultsCheck {Calculation, Text result}
= If (IsEmpty(SampleDate_1), "", "Check_1¶")
& If (IsEmpty(SampleDate_2), "", "Check_2¶")
& If (IsEmpty(SampleDate_3), "", "Check_3¶")
& If (IsEmpty(SampleDate_4), "", "Check_4¶")
& ...
& If (IsEmpty(SampleDate_X), "", "Check_X")

where "Check_Y" are the appropriate values of the checkbox options and
the ¶ character is the Return character that's on one of the buttons in
the Define Calculation window.






Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)
.



Relevant Pages

  • Command Button in Datasheet View
    ... Hi Folks - I'd like to display a list of records in datasheet view. ... the fields is a checkbox. ... then click a command button that runs a report. ...
    (microsoft.public.access.forms)
  • RE: Display a record - several questions
    ... ObjectDataSource set up to get the correct record on a select. ... sub controls in the certain tepmlate and modify them. ... How do I display a RadioButtonList and CheckBox value where it is ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Line breaks in concatenated fields & auto-entries from related tab
    ... you do it in a form or in a query that is bound to the form ... into your query and display the name from the related table. ... Then all you do is select the contents of the calculation field, ... complex functions I've programmed into my FM Pro databases when I see how ...
    (microsoft.public.access.gettingstarted)
  • Re: Table cell display differences between 97 and XP
    ... To Graham Mayor ... Access that are either + or - calc don't have display ... >> fields from the access queries to calculate VAT will not ... >> If you ROUND the calculation in the query the resulting ...
    (microsoft.public.word.mailmerge.fields)
  • Re: calculations, precision in word
    ... (I don't question your concern whether the formatting advice affected only 'display' or whether it performed 'rounding'. ... Formatting the data may not necessarily change the precision that the calculation uses. ... Graham Mayor - Word MVP ...
    (microsoft.public.word.docmanagement)