Navigation combobox won't display past "X".

  • Thread starter Brady Mann - Amatuer Extraordinaire
  • Start date
B

Brady Mann - Amatuer Extraordinaire

I have a combobox on an Access 2003 form. The combobox is used by the
user to navigate to a specific record. I want the record number in this
combobox to match the current record. I have done this with one
caveat...the combobox value goes blank after the 8th record (i.e. when
the user moves to record 9 or above, the combobox goes blank). The drop
down list for the combobox still works fine (I can see all the records
past 8) and navigation is unaffected.

Here is the code I'm using to update the value of the combobox. What am
I doing incorrectly?

If IsNull(TBox_OppID.Value) Then
cbo_SelectRecord = Null
ElseIf Nz(cbo_SelectRecord) <> TBox_OppID.Value Then
cbo_SelectRecord = TBox_OppID.Value
End If
 
D

david epsom dot com dot au

ElseIf Nz(cbo_SelectRecord) <> TBox_OppID.Value Then

n = me.cbo_selectrecord.listcount 'movelast to force cbo to load all
records
cbo_SelectRecord = TBox_OppID.Value
End If


....air code...

(david)
 
B

Brady Mann - Amatuer Extraordinaire

David,

I'm confused by your example:
"n = me.cbo_selectrecord.listcount 'movelast to force cbo to load
all
records "

What exactly am I supposed to replace the "n" with in your code to make
this work?
 
D

david epsom dot com dot au

Brady Mann - Amatuer Extraordinaire said:
David,

I'm confused by your example:
"n = me.cbo_selectrecord.listcount 'movelast to force cbo to load
all
records "

What exactly am I supposed to replace the "n" with in your code to make
this work?

Anything. You can't use

Call me.cbo_selectrecord.listcount

because Access won't accept it. Instead, you have use
a variable:

a = me.cbo_selectrecord.listcount
or
b = me.cbo_selectrecord.listcount
or
c = me.cbo_selectrecord.listcount

or anything else.


(david)
 
Top