cbo problem in Ac2k

richard luft

Registered User.
Local time
Today, 07:50
Joined
Jun 4, 2004
Messages
63
I've recently acquired a bug in my app in Ac2k where, if I enter a cbo by a 'setfocus' command on exit from another control on the same form, my cbo doesn't dropdown (as it's coded to do in the 'ongotfocus' event).
This problem used to not be present, but it has recently started to occur on several of my forms, and is causeing an unexpected problem.
Is my database corrupted in some way? Is the Dropdown command unstable? Is there any suggestion for correcting this problem?
TIA, Richard
 
Last edited:
Multiple users use this?
What did you change recently?
Does it happen on just your system or other computers as well?
Did you do any windows updates that would change this?
 
Multiple users use this?
No
What did you change recently?
Nothing
Does it happen on just your system or other computers as well?
The App only exists on my PC, so I don't know about other pc's.
Did you do any windows updates that would change this?
No.

Richard
 
Last edited:
Create a new DB, import everything from the old one. Try it.
 
Oddly enough, I have a duplicate Db already loaded on my PC, and it has exactly the same problem. I'll try setting up another one just to see, but I don't expect any miracles.
Richard
 
Crilen007:
Nope----even with a new DB, the cbo won't open unless it is entered directly in the tab order of controls on the form. This was never a problem in Access2.0 with 'sendkeys {F4}', and it formerly was not a problem in my Ac2k setup.
(no, I don't have any viruses in my system)

Any other suggestions?
Richard
 
I just tried it with a hack up Db and it seemed to work OK

Had a field called ConractorID an in the OnGotFocus event put

Me.ContractorID.DropDown

Combo box dropped down OK

Then put Me.ContractorID.SetFocus on a cmdButton and it still dropped down OK

Not much help I know, but seemed to work for me.

Dave
 
RE: Try using OnEnter event.
Already tried and failed.

RE: 'Hackup DB"
yes, it works for me also if there are sequential controls on the form. The problem I have is ONLY when I seem to setfocus on the cbo from a field that is not in the tab order.

Thus my fields go: eg---ctr1, ctr2, cbo1, in this order.

If ctr1 has OnExit event as:
If isnull (Ctr1) Then
Me.cbo1.SetFocus
End if
then cbo doesn't dropdown!
But if Ctr1 has data entered, then when I go to Ctr2 and then Cbo1, dropdown event occurs!
Wierd, yes?
Richard
 
Just discovered an amusing solution to my own problem!
Microsoft, in it's infinite wisdom, decided to replace the 'unreliable' SendKeys action with such things as 'Dropdown'. My app was converted from Ac2, where it worked fine with SendKeys "{F4}". Converting my sendkeys statements must have been the problem, since I have just found that going back to the 'unreliable' SendKeys statements makes my cbo's work properly again.
Thanx to all for your suggestions.
richard
 
Good to see you have it sorted :)

See the code in the attached Db used the 'dropdown' method.

Being a recent access programmer (late A97 but mostly 2000) I am not that farmiliar with the send keys stuff. Only really seen it on a Access Microsoft example that used it to filter an address book.

Dave
 

Users who are viewing this thread

Back
Top Bottom