Solved Filtering a combo box (1 Viewer)

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:18
Joined
May 7, 2009
Messages
19,231
I understand what you mean, and I am not using black/dark theme.
on my Edge browser, everything is "normal", all are White background and black foreground for text.
 

Micron

AWF VIP
Local time
Today, 11:18
Joined
Oct 20, 2018
Messages
3,478
I don't think you do. I didn't say you were using dark theme (or that comment could mean that you don't care to view it to see the problem). Telling me what you see is of no help. Here is the formatting of the text in question in your post:

Code:
<span style="color: rgb(20, 20, 20)">
  Start Date: CDate(Format([IW73 TBL with SN]![Start Date], "0000/00/00")
</span>
If you're not purposefully formatting text as black, then that is weird. BTW, the rest of the html on the page uses the default style for fonts.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:18
Joined
May 7, 2009
Messages
19,231
I know the fault.
I copy/paste the code from another post (formatted I guess) and edited it only.
 

Jediknight

New member
Local time
Today, 11:18
Joined
Jul 11, 2019
Messages
15
you add it to the RowSource of the combobox:

select CleanString([theCompanyFieldHere]) As Company From yourTable Group By
CleanString([theCompanyFieldHere]);

Sorry mate, but I don't understand your approach.

Do yo want me to discard the VBA code proposed earlier :

Code:
Function ClearString(strIn As String) As String
'Remove rightmost numbers
With CreateObject("vbscript.regexp")
.Global = True
.Pattern = "(?:[^A-Za-z]+(\s*))*"
CleanString = .Replace(strIn, vbNullString)
End With
End Function

.... and just input the RowSource code only ?

Best regards.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:18
Joined
May 7, 2009
Messages
19,231
you put CleanString function to a Standard Module.
and call it within your query like the one you have.
 

Jediknight

New member
Local time
Today, 11:18
Joined
Jul 11, 2019
Messages
15
I'd just want to do a follow up. This has been resolve. Thank you very much for all the help received!!
And very special thank to arnelgp for taking this one on :) .
 

Gasman

Enthusiastic Amateur
Local time
Today, 16:18
Joined
Sep 21, 2011
Messages
14,223
I'd just want to do a follow up. This has been resolve. Thank you very much for all the help received!!
And very special thank to arnelgp for taking this one on :) .
Would you mind marking it solved then?
That would help others when they are looking?

TIA
 

Users who are viewing this thread

Top Bottom