Re: Multi-Query enter date based on checkbox

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Fri, 23 Jan 2009 11:01:03 -0800, Sean Timmons
<SeanTimmons@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

So, I have a form with about 50 checkboxes as well as combo boxes for sup
name, rep name, date.

I would like to set a query or some such thing that will set the underlying
fields to the selected date for any items that are checked.

So, if items 1, 5 and 8 are checked, but the rest are unchecked, the table
will show the selected date in fields 1, 5 and 8, and blank in 2,3,4, etc.

I'll do this on mouse down, build a command button, or whatever makes it
easiest...

Any thoughts?

Well, a command button... but I've got to say that if you have fifty date
fields controlled by checkboxes, that your table design IS WRONG. If you have
a one (something) to many (dates) relationship, you'll be MUCH better off
structuring it as a one to many relationship with a second table; this table
would have a link to your current table, a field identifying what kind of date
it is (based on the labels of your fifty checkboxes), and a datefield.

Your current structure will get you in no end of trouble as your development
continues - searching for dates will be difficult, adding or deleting a field
will require rebuilding all your queries, forms, and reports... OUCH!
--

John W. Vinson [MVP]
.



Relevant Pages

  • Re: Checkboxes losing value on form re-load
    ... Possible work-around: ... Put your reset-to-checkboxes-default-values code in the Click event of the command button. ... all the checkboxes return to a NULL value. ... re-opening the form from scratch. ...
    (microsoft.public.access.formscoding)
  • Making All Checkboxes Run the Same Code
    ... I have a worksheet that has a couple of dozen checkboxes that are broken ... the command button caption is "Check Category" and it ... Private Sub SendOverdueLetters_Click ... CheckOverdueLettersTasks ...
    (microsoft.public.excel.programming)
  • Re: checkboxes & command button
    ... Ah yes indeed the many checkboxes are grouped into separate Option Groups. ... The single command button is not in any Option Group. ... > I assume the Command Button that your macro is assigned to is on the ... The checkboxes aren't part of an Option Group, ...
    (microsoft.public.access.macros)
  • "You canceled the previous operation."
    ... I've got a form with some comboboxes, five checkboxs and a command button on ... The command button simply launches a query. ... When I check the first checkbox the query runs fine. ... checkboxes but then instead of hitting the command button, ...
    (microsoft.public.access.queries)
  • Tkinter menu question--how to pass arguments
    ... I'm having difficulty structuring a Tkinter menu entry. ... it crashes because it's trying to run the command self.authorizeCommand. ... The reason I'm structuring it in this fashion is that this command takes another command as an argument--in this case, ... Kevin Walzer ...
    (comp.lang.python)