reddevil1
Registered User.
- Local time
- Today, 16:31
- Joined
- Nov 12, 2012
- Messages
- 92
Hi,
I have a simple two-box Cascading Combo on my Form (see attached database and/or coding below).
It seems to work fine, so far, but needs some fine tuning.
So what I am trying to do next, is to work out a simple solution for the following situations:-
1. When TransactionType is Clicked, and the choice STAYS THE SAME (eg. TransactionType is “Electric”, then the user clicks the arrow on the combobox and selects the “Electric” choice again, then CompanyName should also stay the same.
Note: This seems to work in the attached database at the moment…..
2. When TransactionType is Clicked, and the choice is DIFFERENT TO WHAT WAS PREVIOUSLY THERE, then the CompanyName should go blank. Eg. I don’t want an “Electric” CompanyName if the TransactionType is “Maintenance”.
Note: I have tried to insert
Me.CompanyName = “”
in the AfterUpdate event but that made my problem no.1 (above) not work properly because it also cleared the CompanyName even though the TransactionType remained the same.
I have a simple two-box Cascading Combo on my Form (see attached database and/or coding below).
It seems to work fine, so far, but needs some fine tuning.
So what I am trying to do next, is to work out a simple solution for the following situations:-
1. When TransactionType is Clicked, and the choice STAYS THE SAME (eg. TransactionType is “Electric”, then the user clicks the arrow on the combobox and selects the “Electric” choice again, then CompanyName should also stay the same.
Note: This seems to work in the attached database at the moment…..
2. When TransactionType is Clicked, and the choice is DIFFERENT TO WHAT WAS PREVIOUSLY THERE, then the CompanyName should go blank. Eg. I don’t want an “Electric” CompanyName if the TransactionType is “Maintenance”.
Note: I have tried to insert
Me.CompanyName = “”
in the AfterUpdate event but that made my problem no.1 (above) not work properly because it also cleared the CompanyName even though the TransactionType remained the same.
Code:
Private Sub TransactionType_AfterUpdate()
Me.CompanyName.Requery
Me.CompanyName.SetFocus
End Sub