Forms & Data source

GISGuy

New member
Local time
Today, 19:31
Joined
Apr 12, 2010
Messages
4
I just created a form & i am trying to have 2 fields be populated bases on what Primary cause factor i choose.

Causes are based on what Cause factor i choose,

Sub-causes are based on what Cause i chhose.

I have set up relationships & set data source, but it's not working. Can someone look at it & tell me what i am doing wrong. Thanks
 

Attachments

You have the wrong control referenced in your row source query for the second combo box.
 
in the criteria row? [Forms]![PRIMARY CAUSE FACTORS]![Cause_Factor]
 
Yep, that's the one.
 
Thanks SOS....!!!!

1 more question. With 3 combo boxes, & the 2nd based off of what i select in the 1st, which means i set up a event procedure. Do i have to set a event procedure in the second so i can have the 3rd combox populate based on what i select in the 2nd.
I hope thats not to confusing
 
Yes, you would need to requery the third one in the after update of the second one.
 
Just as a side note, I know when i have done this in the past, You need your row source on your third box to be a combination of the first two. Otherwise you will populate all data where condition 2 is true. But really what you want is for condition 1 and condition 2 to be true.
 
Normally, if it was set up properly it wouldn't need the first combo info for the third. The table that the 3rd is based on would only store the value from the second combo which would be related up the line, so to speak. But in this case, it is true that the values are being stored in both places so you have to refer to each of them. I think this is not completely normalized.
 
I don't have 2007 so unfortunatly i can't see the data, but i know with mine it used a table of given Municipalities, lots and concessions. (All from one table)

The drop downs would filter, Concessions 1-10 may exist in many municipalities, and lots 1-30 may exist for each concession, so i have to reference the other 2 fields before my lots would populate with the proper lots.

To me, this is still as normalized as it's going to get, no?
 
I don't have 2007 so unfortunatly i can't see the data, but i know with mine it used a table of given Municipalities, lots and concessions. (All from one table)

The drop downs would filter, Concessions 1-10 may exist in many municipalities, and lots 1-30 may exist for each concession, so i have to reference the other 2 fields before my lots would populate with the proper lots.

To me, this is still as normalized as it's going to get, no?

Nope, not normalized. Municipalities would be in a separate table, Concessions in another, and Lots in another.

Then you have a junction table to handle Concessions to Municipality and then another junction table for Lots to Concessions.
 
hmmm.. Problem being it's not always a simple 1-30 issue...

i.e

Munic --- Concession --- Lot

A -------- 1 ---------- 1
A -------- 2 ---------- 1
B -------- 2ERS ------- 10 (Doesn't have a 1 - 9)

ect....
 
Well, I would have to dig in deeper with you on this, but based on viewing the OP's database, theirs is not normalized and should be.
 
Can you take a look,

combo box 1 & 2 are fine. But in the event procedure for 3 is wrong.

When i set the event procedure to requerry for it messes up combox 2.
 

Attachments

attachment.php


attachment.php
 

Attachments

  • mevp01.png
    mevp01.png
    18.8 KB · Views: 319
  • mevp02.png
    mevp02.png
    20.6 KB · Views: 299

Users who are viewing this thread

Back
Top Bottom