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

A total dead end

Status
Not open for further replies.

ninash

Technical User
Jul 6, 2001
163
GB
Hi All,

I am not sure if anyone is going to understand this problem or how to start on attacking it.

My problem is this.
I have a table with common faults found (say in a computer)
But each of these faults have various causes, this number of causes varies from fault to fault.

Now the above is simply a form within a form to allow me to write the linked data. and that is ok for putting the information into the database.

What I need to do it present the information is such a way that the user can select the cause or causes of the fault.

I was thinking of a form showing the fault then having check boxes indicating the faults as A,B,C refs but I have no idea how to go about coding such a thing.

If anyone understands what I am on about and can lend me a hand please do as I am running out of hair from all the worry.

Tony
 
Assuming that you have 2 tables, one tblFaults and the other tblFaultCauses with a foreign key link back to tblFaults, you can have a main form based on tblFaults and a subform based on tblFaultCauses. If you create your form for tblFaultCauses as a DataSheet or Continuous form then when you drag it onto the form for tblFaults as a subform, they will automatically filter for you based on the common key into tblFaults.

This is just the general answer, if you need more specific help let us know...

Good Luck! Please remember to give helpful posts the stars they deserve! This makes the post more visible to others in need![thumbsup]
 
thanks for your reply Sbendbuckeye but it more a case of display to the user

the user doesnt need to see the text in the causes as they already know it they just need to select it. My problem is if I use check boxes making the form I am using recognise that the current fault has x amount of causes and makes the right amounts of check boxes visible.

There are a maximum of 7 causes Minimum of 1
After they have selected the causes I can write the selection information to another table from where it will be used later. This exercise is a matter of not giving the user to much information and therefore less chance of making a mess.

The sort of thing I am thinking of is
a bit of code that makes a record set of causes table then one from the linked faults table
When the fault is selected the code will count the ammount of causes and activate/show the correct amount of check boxes.

Now I intend using a combo box for fault selection so this code will go into the lost focus event on that object.

Is my thinking correct and how do you count the records in the second set then change the visible settings on the check boxes to suit.

And thoughts
Tony
 
It sounds like this is some kind of a user questionaire form where once they have selected the "main" fault, then they select one or more of the causes for their case out of a defined list varying from 1 to 7 for each "main" fault. Am I understanding this correctly?

If so, perhaps you could have seven text boxes on your form with 7 checkboxes with no label next to each of the text boxes. Then you could write out to your table whatever they selected.

In your form On Current code you could disable any text boxes and check boxes which were not availabe for the current record or selected record via the combo box below.

I like your idea of allowing the user to select the "main" fault out of a combo box. I do that all the time to allow users to select any record out of a table easily.

Do you have a 1 to many relationship defined between these 2 tables or are they separate fields?

Hope this helps. If I'm way off of the mark, please post some additional information to clarify what you are trying to do.

Have a graet weekend! Good Luck! Please remember to give helpful posts the stars they deserve! This makes the post more visible to others in need![thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top