trouble with validation rule in subform

O

OmahaAccess

This may accidently be posted twice.
I'm not for sure if I will explain this well enough to understand but I will
try.
I am making a sewer bypass record database. I have many bypasses, each
bypass has many details. One of the details is Mitigation Steps. There are 3
possible Mitigation Steps. Each bypass can have: jet line, saw line, or
remove debris. The bypass may have just 1 Mitigation step or it can have 2
or 3. It cannot have the same step twice or cannot have an option that is
not in the list. I have a subform within a form through a many to many
relationship. I have the junction table to set that relationship up. I get
the subform to work fine, other than getting some validation rules set up to
make it so one option cannot equal another option and only 3 options can be
selected. Maybe its not a validation rule that I need? Anyone have any
ideas? Thanks
 
N

NetworkTrade

mmmmm I would consider having those three as simple radio buttons....

User can select first second or third - or any combination of the three but
nothing twice and nothing else...

might work...
 
W

Wayne-I-M

Hi Omah

To assign a value from your option group as suggested by NetworkTrade you
could use the AfterUpdate event – something like this.


Private Sub OptionGroupName_AfterUpdate()
Select Case Me!SomeFrameName
Case 1
Me. MitigationStep = 1
Me.SomeField = “Jet Lineâ€
Case 2
Me. MitigationStep = 2
Me.SomeField = “Saw Lineâ€
Case 3
Me. MitigationStep = 3
Me.SomeField = “Remove Debrisâ€
End Select
End Sub


Hope this helps

--
Wayne
Manchester, England.
Enjoy whatever it is you do
Scusate,ma il mio Inglese fa schiffo :)
Percio se non ci siamo capiti, mi mandate un
messagio e provero di spiegarmi meglio.
 
Top