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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generate checkboxes from table records 1

Status
Not open for further replies.

xollef

Technical User
Apr 23, 2002
30
0
0
Hello

I have a mainform that contains information on orders stored in an ordertable, then for each order i want to be able to store plenty of tests for that order. I have an test table where all the different tests are. They can be manipulated, added new edited or deleted. Then the third table order_tests is linked to orders with an ID field.

Tables:
orders # id, info 1, info 2
orders_tests # id, order_id, test
test # id, test_code, test_name

The problem I have is how to get the tests show up as checkboxes on a subform to the main orderform. And then how to save them into the orders_tests table.

Anyone have any idea on how to do this, or other way on achieving this?
 
Hi

How about the table Orders_Tests having a row for each test, so design would be

Order_Id
Test_id
Test_Result

The test results could then be displayed in a simply sub form on the Orders form

Do not know enough about your application to know how you would populate Orders_Tests, but..

If say tests where dependant of order type, and you had a master list of tests, flagged with which Order type they applied to, a simple Append Query could be made to populate the Orders_tests table with a list of applicable tests

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Well orders_tests will only store wich tests belong to the order. And there will be one row for each test connected to the order with order_id

The problem is I can't get the tests displayed with a checkbox on the form, one checkbox for each test in the test table.

So when someone is filling in a new order, he can just click which tests will belong to the order and then it will store the information in order and order_tests.

How to display all records from table tests at once with checkboxes?
 
Thanks for the reply, I am aware that I should use A subform, my problem is I don't know how to design the form so that it works as I want.

If I design it normally it will only show one record per time / if you design it as a datasheet, then you can view all records directly, but then if i add checkboxes to it they all check and uncheck when just clicking one. They are somehow linked to each other.
Are they bound or not doesn't matter.

There has to be some way to pull this off easily I just don't get it designed correctly, so it works



 
Hi

If you have a bound datasheet (where the check box control too is bound), then it will work as you require, ie you can tick one box without the rest being ticked

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Well now thank you so far, now I have a subform with checkboxes, and you can check them correctly.

But next step / problem, how do I save the checked boxes / tests into another table orders_tests.
The subform uses tests table as source and only the checked I want to store into the orders_tests table.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top