C
Cheeshead
Guest
OK I'm trying to figure this out, and I giving myself a migrane. i have it partially complete but can't get it 100%....Let me see if I can explain.
Fields - TaxID, Country
Buttons A(command33), B(command34), C(command35) (the buttons are for printing reports)
Criteria: (here's where the fun starts)
1. When Country = USA or Canada, button A is disabled
2. When countrs does not = USA or Canada, button B and C are disabled
3. When TaxID = any value, button B is disabled
4. When TaxID = no value, button C is disabled
---Now this I can get, but when Country does not = USA or Canada,
and TaxID = no value, button B enables itself, when I need it disabled.
Here's my code:
If Me.Sold_to_Country = ("USA") Then
Command33.Enabled = False
Command34.Enabled = True
Command35.Enabled = True
Else: Command33.Enabled = True
Command34.Enabled = False
Command35.Enabled = False
If Me.Sold_to_Country = ("Canada") Then
Command33.Enabled = False
Command34.Enabled = True
Command35.Enabled = True
Else: Command33.Enabled = True
Command34.Enabled = False
Command35.Enabled = False
End If
End If
If Not IsNull(Me.Tax_ID) Then
Command34.Enabled = False
Else: Command34.Enabled = True
End If
--
Any help would be greatly appreciated.
Fields - TaxID, Country
Buttons A(command33), B(command34), C(command35) (the buttons are for printing reports)
Criteria: (here's where the fun starts)
1. When Country = USA or Canada, button A is disabled
2. When countrs does not = USA or Canada, button B and C are disabled
3. When TaxID = any value, button B is disabled
4. When TaxID = no value, button C is disabled
---Now this I can get, but when Country does not = USA or Canada,
and TaxID = no value, button B enables itself, when I need it disabled.
Here's my code:
If Me.Sold_to_Country = ("USA") Then
Command33.Enabled = False
Command34.Enabled = True
Command35.Enabled = True
Else: Command33.Enabled = True
Command34.Enabled = False
Command35.Enabled = False
If Me.Sold_to_Country = ("Canada") Then
Command33.Enabled = False
Command34.Enabled = True
Command35.Enabled = True
Else: Command33.Enabled = True
Command34.Enabled = False
Command35.Enabled = False
End If
End If
If Not IsNull(Me.Tax_ID) Then
Command34.Enabled = False
Else: Command34.Enabled = True
End If
--
Any help would be greatly appreciated.
Last edited: