Drop Down List Only Show 4 Records

  • Thread starter Thread starter Gulf Coast Electric
  • Start date Start date
G

Gulf Coast Electric

I have a form that with a drop down list and I only want it to show OnClick
4 records.
I tried entering 4 in the List Rows, this did not work.



If (gBol_UseErrorHandler = TURNED_ON) Then
On Error GoTo Error_Handler
End If
Forms!subfrmIncSubCat.Section(3).Visible = False
UpdateIncTable

Exit_cboIncSubCat_Click:
Exit Sub

Error_Handler:

ErrMessage "", (Me.Name & ".cboIncSubCat_Click")
Resume Next
 
Hi Gulf:
4 rows as in a specific set that you could filter for in
the query behind the combo box?
OR
4 rows of any data. Set the List Rows property of the
combo box to 4

Hope This Helps
 
I tried entering 4 in the List Rows, this did not work.

Entering a number in the ListRows property of a combo box works for me. No
other code is required. What happens when it "does not work"?
 
I have not yet been able to produce your results. How about posting some
more detail ... Version of Access (incl SPs), other combo box properties
and any event code associated with the combo box.
 
Cant make this drop down list only show 3 or 4 records so it wont cover over
the other form information.
Microsoft Access 2002 SP3
Database in 2000 file format
Sub-Form based on table
Row Source Type Table Query
Row Source SELECT tblIncSubCategories.SUB_SubCatNumb,
tblIncSubCategories.SUB_SubCatDescr, tblIncSubCategories.SUB_CatNumb FROM
tblIncSubCategories WHERE
(((tblIncSubCategories.SUB_CatNumb)=[Forms]![frmIncsMaster]![subfrmIncList]!
[txtSelCat]));
Column Count 3
Column Heads No
Column Widths 0";2.9785";0"
Bound Columns 1
List Rows 3
List With 1"
On Click Event Procedure

If (gBol_UseErrorHandler = TURNED_ON) Then
On Error GoTo Error_Handler
End If
Forms!subfrmIncSubCat.Section(3).Visible = False
UpdateIncTable

Exit_cboIncSubCat_Click:
Exit Sub

Error_Handler:

ErrMessage "", (Me.Name & ".cboIncSubCat_Click")
Resume Next
 
Thanks, Dave! This is good, detailed information. Let me play with this
a bit - I also have Access 2002, although have not yet applied SP3 - so we
have a good basis for investigation.
 
Dave,

I attempted again to reproduce the behavior you report on the combo box in
your subform, (creating a form/subform with combo in the subform and setting
properties identical to yours) both before installing SP3 and after. I am
still able to get the combo box to show 3 rows. The only thing I can
suggest to you at this point is to do a Compact/Repair or to create a new
database and copy all of the objects from your existing database into the
new db.
 
Cheryl:
Thanks, that did help,the drop down list shows just three records now, yeah,
but it also shows a white space after that , I need for this to go away.The
white space is after the drop down list.
 
Back
Top