Hello,
i've created a Record Lookup combobox by using the Wizard.
This has the following event code:
I also have a filter that is created when the form is loaded. This has the following event code:
The problem is that the Record Lookup combobox shows ALL the records, not just the filtered records.
- I would like to show this combobox only the records that are available when a filter has been set.
- When no filter has been set it should show all records
Could someone explain to me how to do this??
Kind regards,
Martijn
---
It's never too late to do the Right thing
i've created a Record Lookup combobox by using the Wizard.
This has the following event code:
Code:
Sub Combo512_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[Job] = '" & Me![Combo512] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
I also have a filter that is created when the form is loaded. This has the following event code:
Code:
Private Sub Form_Load()
Dim username As String
username = fOSUserName ' Haal gebruikersnaam op
Select Case username
Case "name" 'Settings for user
Filter = ""
OrderBy = ""
Filter = addcriteria(Filter, "[Status] = " + Chr(34) + "Actief" + Chr(34))
Filter = addcriteria(Filter, "[Uitvoering] Like" + Chr(34) + "*FB*" + Chr(34))
OrderBy = addcriteria(OrderBy, "[Job] DESC")
FilterOn = True
OrderByOn = True
The problem is that the Record Lookup combobox shows ALL the records, not just the filtered records.
- I would like to show this combobox only the records that are available when a filter has been set.
- When no filter has been set it should show all records
Could someone explain to me how to do this??
Kind regards,
Martijn
---
It's never too late to do the Right thing