[AccessD] Combo box not displaying 6 numbers

Rocky Smolin rockysmolin at bchacc.com
Sat Mar 11 09:37:00 CST 2017


I solved the problem using the ever-popular if slightly annoying Not In List
event. It works (or d**n well better) because they know the case number that
they want to fill in there so they don't really need the list. 

Posting here in case someone can use it:

    strTemp = Nz(DLookup("fldCaseID", "tblCase", "fldCaseNumber = " &
Val(NewData)), "")
    
    If strTemp = "" Then
        MsgBox "That is not a valid case number."
        Response = acDataErrContinued
        Exit Sub
    End If
    
    Me.fldCaseID = Val(strTemp)
    Me.Requery
    Response = acDataErrContinue

Yes, I could tighen up the code by using Then but when something works I
usually stop developing. :)

HTH

Rocky


-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Bill Benson
Sent: Thursday, March 09, 2017 8:54 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Combo box not displaying 6 numbers

I would tend to think performance would be an issue since I doubt you can
"filter" a combo rowsource, so much as adapt/change the rowsource on the
change event of the 1st control. If I were implementing it and it was
running slowly, I would probably check in thr change event for presence of
3 characters (thus for 1001 must enter 001 in 1st control)... even then, if
the user wants to edit 123 to say 145, they should delete the entire 123
before entering 145, or else if they delete the 2 and make it 4 they would
issue an unnecessary request on 143 before deleting the 3 and putting 5.

>From my non-flammable Note 3,

Bill Benson

On Mar 9, 2017 11:22 PM, "Rocky Smolin" <rockysmolin at bchacc.com> wrote:

> That might do. Depends on how the user wants it to behave.  I'll have 
> to ask.
>
> R
>
>
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf 
> Of Bill Benson
> Sent: Thursday, March 09, 2017 7:14 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Combo box not displaying 6 numbers
>
> How about using 2 combos, or one and a textbox. The first is where you 
> enter the number from 1 to 163, the 2nd combo then filters to items 
> ending the full sequence.
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list