Combo Box question

Paul Cooke

Registered User.
Local time
Today, 22:05
Joined
Oct 12, 2001
Messages
288
Hi guys could someone avise me how to do the following please?

I have a cbo on a form (cbo 1) if the notinlist event is triggered a msgbox pops up asking if the spelling is correct if response is no it un-does the entry and drops the box down so they can select an item from the list.

If the response is yes cbo 1 is undo, disabled and not visable and another cbo (cbo 2) becomes visable and enabled and gets the focus.

At this point as it is the user has to re-enter thier original value again. Is it possible to populate cbo 2 before cbo 1 becomes disabled not visable ect.

many thanks for any adice you can offer
 
I would think stepping through it like this would work. Maybe someone more knowledgable about this can confirm or deny though.

if yes then
cbo2.value = cbo1.value
cbo1 undo, disable, & not visible
cbo2 enable & visible
end if
 
hi thanks for the reply

On the right lines I think but does not seem to want to work I suppose what I need in simplistic terms is for the value in cbo1 to be copied to cbo2 before cbo 1 hits the undo line if the value is equal then as soon as cbo1 is undo so is cbo2?
 
do you really need to undo it? or try setting a variable = to cbo1 before undoing it, but I would think thats the same as setting cbo2 = cbo1 before undoing it.
 
hmmm I know what you mean - I think I need to look at this again to work out what I need it to do as it could be a case of spending hours trying to resolve somthing that can be done another easier way !

thanks again
 
If the response is yes cbo 1 is undo, disabled and not visable and another cbo (cbo 2) becomes visable and enabled and gets the focus.
Pseudocode:
Code:
if Msgbox(...) = vbYes then
     Me.cbo2.SetFocus
     Me.cbo1.Value = Me.cbo1.OldValue
     Me.cbo1.Visible
     Me.cbo1.Enabled = False
end if
 
Hi Many thanks for the reply

After thinking about the issue for a while I decided there ws a better way to go in this which did'nt need the code but thanks for posting it anyway as It will come in useful at some point I'm sure
 

Users who are viewing this thread

Back
Top Bottom