Form Combo Box After Update Event (1 Viewer)

Nowee101413

New member
Local time
Today, 21:49
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,
 

bob fitz

AWF VIP
Local time
Today, 19:49
Joined
May 23, 2011
Messages
4,727
Perhaps:
Code:
If Not Me.NewRecord Then
  [BillingCity] = ""
  [BillingState] = ""
  Me.BillingCity.Requery
  Me.BillingState.Requery
End If
 

Nowee101413

New member
Local time
Today, 21:49
Joined
Apr 14, 2020
Messages
7
Thanks for this.
 

Users who are viewing this thread

Top Bottom