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

Removing value of a field based on contents of other field

Status
Not open for further replies.

DBritter

Technical User
Joined
Jun 28, 2000
Messages
37
Location
US
I am creating a form where one list box's range of choices(strShippingOptions) is based on another list box(strShippingCompanies).

The problem is that on the form level when I change the option in strShippingCompanies, strShippingOptions is effected but in the table the origal chioce remains. It is now possible to have "UPS" selected for strShippingCompanies and "2nd Day Fed Ex" for strShippingOptions.

I would like the strShippingOptions field cleared everytime the strShippingCompanies is changed. How do I accomplish this.
Thank you in advance. [sig][/sig]
 
Here's an Idea that may fix your problem and eliminate extra mouse clicks too.
This is what I did
Just have one Shipping box with all options in it:
Create a new Table and then the end suers can change carriers and methods.
then use 'Instr' to get the Carrier and the ship method:

Airborne-2 Day
Airborne-OvrNite
FedEx-2 Day
FedEx-OvrNite
UPS-Grnd
UPS-Blue
UPS-Red

Private Sub Combo0_AfterUpdate()
Me!Text2 = Left(Combo0.Text, InStr(Combo0.Text, "-") - 1)
Me!Text4 = Right(Combo0.Text, Len(Combo0.Text) - InStr(Combo0.Text, "-"))
End Sub

So Text2 = UPS or FedEX or Airborne
and Text4 = 2 Day, OvrNite, Grnd etc.




[sig]<p>DougP, MCP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.[/sig]
 
I need to be able to clear the strShippingOptions field if the strShippingCompanies field is changed.
I will be using this procedure with other fields in the database. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top