S
SuperOpus
I'm trying to add a custom list of 2 items in a combo dropdown in a form.
The code I'm using is 'partially' working. The problem is this: Even
though I'm scrolling through the list (a filtered list of records), it grabs
the record #1 info to build my dropdown list. They want some dropdowns in
other spots similar to this one if I can get it working. I didn't see any
options along the lines of form.currentrecord.lastname, but that's what I'm
asking for.
Can anyone help???
TIA
Steve
Function ListSalutation(fld As Control, id As Variant, _
row As Variant, col As Variant, code As Variant) _
As Variant
Dim intOffset As Integer
Select Case code
Case acLBInitialize ' Initialize.
ListSalutation = True
Case acLBOpen ' Open.
ListSalutation = Timer ' Unique ID.
Case acLBGetRowCount ' Get rows.
ListSalutation = 2
Case acLBGetColumnCount ' Get columns.
ListSalutation = 1
Case acLBGetColumnWidth ' Get column width.
ListSalutation = -1 ' Use default width.
Case acLBGetValue ' Get the data.
Select Case row
Case 0
ListSalutation = [Title] & " " & [LastName]
Case 1
ListSalutation = [FirstName]
End Select
End Select
End Function
The code I'm using is 'partially' working. The problem is this: Even
though I'm scrolling through the list (a filtered list of records), it grabs
the record #1 info to build my dropdown list. They want some dropdowns in
other spots similar to this one if I can get it working. I didn't see any
options along the lines of form.currentrecord.lastname, but that's what I'm
asking for.
Can anyone help???
TIA
Steve
Function ListSalutation(fld As Control, id As Variant, _
row As Variant, col As Variant, code As Variant) _
As Variant
Dim intOffset As Integer
Select Case code
Case acLBInitialize ' Initialize.
ListSalutation = True
Case acLBOpen ' Open.
ListSalutation = Timer ' Unique ID.
Case acLBGetRowCount ' Get rows.
ListSalutation = 2
Case acLBGetColumnCount ' Get columns.
ListSalutation = 1
Case acLBGetColumnWidth ' Get column width.
ListSalutation = -1 ' Use default width.
Case acLBGetValue ' Get the data.
Select Case row
Case 0
ListSalutation = [Title] & " " & [LastName]
Case 1
ListSalutation = [FirstName]
End Select
End Select
End Function