Check boxes in Forms

D

Double A

If I have a series of categories, and each category has associated with it a
number of steps, is there a way to check the box for that category and have
all of the steps populate in a satabase table? I have a subform that is in
spreadsheet format. For each category, you have to choose a step to display.
But if the category has multiple steps, I need to keep choosing category and
then a step. Is there a way to choose a category and have all of the steps
fill in the spreadsheet?

Thanks.
 
D

Duane Hookom

I am confused by your question. Could you provide your table structure and
what exactly you want to happen in these fields and what triggers the
"happen"?
 
D

Double A

My database is used for a small business where it records customer
information, a work order records the specific work requested as well as some
free hand comments that might need to be noted based on the job or the
customer. When you complete the work request, I have a subform that records
the category of work(based on a list table), the specific information about
that category (each category has a series of records of detail that had to be
split up because it was longer than 255 characters) and then a comments field
where job specific things can be added like size of room etc.) I am looking
to be able to choose a category from the drop down menu and have all of the
records of detail populate the subform automatically.

Does this clarify my question?
 
D

Duane Hookom

It seems you have me confused in two different threads ;-). When I ask for
table structure, I expect to see something like:

tblCustomers
==============
CustID PK
CustName
.....

tblWorkOrders
=================
WOID PK
WODescription
CustID related to tblCustomers.CustID
......

tblCategoryLookup
==============
.....

I think you need an append query but I don't know from what table to what
table and if there are any unique indexes or anything else.
 
D

Double A

Here is what I think you are looking for.

tblCustomerInfo
_____________
CustomerNumber
Prefix
FirstName
LastName
Address
City
State
ZipCode

tblWorkOrder
___________
WorkOrderNumber
EstimateDate
CustomerID related to tblCustomerInfo.CustomerNumber
CategoryA these are yes/no check boxes
CategoryB
CategoryC

tblWorkLineItem
_____________
WorkOrderNumber related to tblWorkOrder.WorkOrderNumber
LineItemNumber
Category
Info
Comments
Cost

tblCategory
_________
Category related to tblWorkLineItem.Category

tblInfoDetails
___________
InfoID related to tblWorkLineItem.Info
Category
Info

Thanks.
 
D

Duane Hookom

Why do you have 3 category fields in tblWorkOrder? I would think you already
have this information stored properly normalized in tblWorkLineItem.

Do you want to be able to select categories from tblCategory and have them
appended to tblWorkLineItem for an existing record in tblWorkOrder?
 
D

Double A

I think this might be what I want. Please let me ask you a question in a
different way to see if I understand this.

The tblInfoDetails is set up like this.
Category Info
Walkway Escavate existing walkway.
Walkway Prepare footings for new walkway.
Walkway Remove debris and clean area.

If I were to create a form using tblWorkOrder and tbl WorkLineItem or
tblInfoDetails, I would like to choose a category from a drop down menu and
have all of the lines of Info associated with that category automatically
populate to the form, and ultimately to the report.

Will your suggestion of appending allow me to do this?
Thanks.
 
D

Duane Hookom

I am confused by your table structure since you have InfoID in tblInfoDetails
related to tblWorkLineItem.Info and yet the Category and Info fields are in
both tables.

Normally tables are structured with a primary/foreign key relationship where
a table is related one to many. I don't see that in your table structure.
 
D

Double A

As I said before, I am setting this up by trial and error. I would
appreciate any suggestions of how to set up my tables so that I might be able
to choose a category from a drop down list and have all of the Infos populate
a table automatically.

Thanks in advance for your assistance.
 
D

Duane Hookom

I don't understand your tables. Let's assume you have a project records in
tblProjects with ProjectID as the primary key field. Another table, tblSteps,
lists all of the possible steps in each project with a primary key field of
StepID.

Your third table would be a junction table, tblProjectSteps, that stores
every step for every project.

tblProjects
===========
ProjectID primary key

tblSteps
===========
StepID primary key

tblProjectSteps
===========
ProjStepID
ProjectID relates to tblProjects.ProjectID
StepID relates to tblSteps.StepID
StepComments
StepStatus

You can use a query to append all steps to the current project with a query
like:
INSERT INTO tblProjectSteps ( ProjectID, StepID)
SELECT Forms!frmProjects!txtProjectID, StepID
FROM tblSteps;
 

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