[AccessD] Combo force drop down UNDO

David McAfee DMcAfee at haascnc.com
Tue Mar 25 21:40:02 CST 2003


Yup:
 
Private Sub cboPN_Change()
If Len(Me.cboPN.Text) < 2 Then
    Me.cboPN.RowSource = ""
Else
    Me.cboPN.RowSource = "EXEC stp_007A_FillcboPN '" & Me.cboPN.Text & "'"
    Me.cboPN.Dropdown
End If
End Sub
 
I would have went bigger, but we actually have 2 digit PN's :(
 
Anyway, I finally got aggravated enough that I went back to my old plan of
having the user enter the PN into a text box and calling a SPROC in the
after update event of the text box. If the PN doesn't exist, then I give
them a nice ol' MsgBox and clear out the field :)  I figured that since the
form is unbound, I can disable the [OK] button until all fields have good
data in them ;)
 
Another thing you can do, if you don't get this working, is to switch to a
text box and make an non visible list box appear under the text box, then on
select (of the LB), populate the text box and hide the lb!
 
HTH
 
David McAfee

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Software Design &
Solutions Pty Ltd.
Sent: Tuesday, March 25, 2003 7:21 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Combo force drop down UNDO


David - it sounds like your form is quite similar. Are you forcing the drop
down to display after the first 2 chars are entered? That forcing of the
drop down is what's mucking up the behaviour of the combo.
 
I have put this combo on the very front menu (as there may be 20,000
clients), so that users can zero into the record they want straight away.
They then hit a 'Go' button to open the appropriate client detail record. 
 
What's wrong with the drop down list still being displayed? It *feels* like
you haven't made a selection, because normal combo behaviour would be:
 
1. Click on drop down arrow (or F4) to see options.
2. Click on an option.
3. Option selected appears in control.
4. The drop down disappears.
 
When the 4th part doesn't happen it goes against expected behaviour and is
confusing.
And because this combo has a wide drop down (5 columns) it really is
blocking the users from seeing other menu options.
 
They have to find a blank place on the menu and click there to get rid of
it.
 
I could forget about forcing the drop down, but as there is no record source
until 2 chars are entered, it looks great to enter 2 and then the list
populated and displayed automatically.
 
Kath

----- Original Message ----- 
From: David  <mailto:DMcAfee at haascnc.com> McAfee 
To: 'accessd at databaseadvisors.com' <mailto:'accessd at databaseadvisors.com'>  
Sent: Wednesday, March 26, 2003 2:19 PM
Subject: RE: [AccessD] Combo force drop down UNDO

Kath, I have a very similar form which acts the same way. I have to look up
PNs and if I didn't limit the result set by not calling the SPROC until I
have at least two characters in my combo box, I'd have a lot of PN's in that
combo box!

Anyway, after I click on the combo, I (or the user) clicks on another field
or hits tab to leave the field, so the combo at that points hides the drop
down, so why go through the work of trying to hide it? What does the user do
next on your form after selecting something from the box? Is there an OK
button? I am just trying to visualize what's going on.

D
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
<mailto:accessd-bounces at databaseadvisors.com> 
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Software Design &
Solutions Pty Ltd.
Sent: Tuesday, March 25, 2003 6:26 PM
To: accessd at databaseadvisors.com <mailto:accessd at databaseadvisors.com> 
Subject: Re: [AccessD] Combo force drop down UNDO


Thanks John. That would work except that this is a combo that has no row
source until the first 2 letters have been entered by the user. So the combo
has an 'on change' event which requires the control to have the focus.
Moving the focus to another control on the after update won't allow the on
change to occur.

I need to know how to keep the focus on the control but kill the drop down.

Kath
----- Original Message ----- 
From: John Ruff 
To: accessd at databaseadvisors.com <mailto:accessd at databaseadvisors.com>  
Sent: Wednesday, March 26, 2003 12:41 PM
Subject: RE: [AccessD] Combo force drop down UNDO


In the dropdown's AfterUpdate, set the focus to another control.

Private Sub TxtClientSurname_AfterUpdate()

    LastName.setfocus

End Sub

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030325/ec8f12b9/attachment-0001.html>


More information about the AccessD mailing list