Form Combo Box After Update Event

Nowee101413

New member
Local time
Today, 08:26
Joined
Apr 14, 2020
Messages
7
Hi,

I have three Combo Boxes on my form, BillingCity, BillingState, and BillingCountry, I have written the below code in BillingCountry Event After Update to so that everytime the BillingCountry is updated, the current record for BillingCity and BillingState is deleted and you would need to to update the BillingCity and BillingState.

[BillingCity] = ""
[BillingState] = ""
Me.BillingCity.Requery
Me.BillingState.Requery

The issue is when I enter a new record and fillup the BillingCity and BillingState first. When I update the the Combo Box for BillingCountry, the record for BillingCIty and BillingState will be deleted as well. What I need is when a new record is entered (BillingCountry still has Null Value), the above command will not fire.

Thanks,
 
Perhaps:
Code:
If Not Me.NewRecord Then
  [BillingCity] = ""
  [BillingState] = ""
  Me.BillingCity.Requery
  Me.BillingState.Requery
End If
 

Users who are viewing this thread

Back
Top Bottom