Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a check box that updates

Status
Not open for further replies.

junkkine

IS-IT--Management
Jan 12, 2003
6
US
Hello all,
I have a check box (yes/no) in a form. I want the checkbox when it is checked or unchecked to update another table which is not a yes or no, it's data.

How to I populate the information to the other table when the check box is selected?

EX:I have a customer table for cabinet installations. In the customer form I have a checkboxes for Demo Instructions, Permits, City Inspections, Framing, Plumbing, Electrical, Counter Tops, Floor repair etc etc..

Not all customer jobs will have all the same elements, so in my customer form I have all of the possiblities listed as check boxes.

If a job has Plumbing, the check box is selected, if it doesn't it is left unchecked.

When the check box is checked (ex: Plumbing), I want another table to be updated that the customer job has Plumbing (If the check box is selected in Table A, then in Table B in a field the entry would be PLUMB..)

The sole purpose of this is to generate a report that shows grouped phases by type: Demo Instructions, Permits, City Inspections, Framing, Plumbing, Electrical, Counter Tops, Floor repair etc etc..

This report will let us see how many customer jobs have how many different types of phases that need to be done.

If you are confused, just respond to this post and I will give you as much information as I can...
Thanks in advance for your help.
 
How is table B structured? I assume you have a table which holds JOBS. Then I assume that table B is a one-to-many relationship with the JOBS table, where

TableB
Field: JobID (number from JOBS table)
Field: JobType (plumbing, electrical, etc)

When you are checking the box on the form, is it really going into a table (A)? If so, why are you saving the same information in two places?

Please list the structure of the tables.



Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Table (A) is a table containing categories that lists all the different sub-contractor types. [plumber, electrician, etc..]

Fields Table A
-Sub Id
-Sub category [plumber, electrician, tile, demo, etc.]

Table (B) is where the data is stored.
-Trade ID [Sub-contractors address, phone etc.]
-Cust ID [Customers]
-Sub ID
-Trade type [Plumber, electrician, tile, demo, etc.]

Sub ID is the relationship between tables A and B. In my form I use table A as my list (currently a drop down) for table B [lookup list]. The problem I’m having is I need the form for Table A to have check boxes not a list box, to select the different trades [plumber, electrician, tile, counter top etc] which then would update Sub Id from table A [check boxes] to Table B is were the data will saved, this will tell us which subs [plumber, electrician, etc.] are doing what for each customer.
 
Can't see, then, why the data needs to go into table A. It looks to me like the data should be going entirely into table B, with Trade Type being pulled from Table A via a lookup, relationship or dropdown of some sort.

Have fun! :eek:)

Alex Middleton
 
Is it because you want to see all of the options on the screen at once rather than in a drop-down?

Can you give sample data of Table B? If you save the SubID, then why do you also put in the Trade Type? Isn't "Trade Type" the word description of SubID which is held in table A?

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
I was using a list box to choose the type of trade [plumber, elect.] The problem is, a single job can have multiple trades (up to 48 different trades). It would make it easier, more user friendly in the form, to use check boxes instead of a list box.




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top