RowFilter with decimal value

  • Thread starter Thread starter rene spreckelsen
  • Start date Start date
R

rene spreckelsen

Hi,

i try to set a rowfilter with dezimal values like 2,7.
....
vw1.RowFilter = "Key='" & Me.C1FlexGrid1.Item(cellZeile, cellSpalte) & "'"

After run this row, it crash

thx Rene
 
Two possible suggestions:

1. Remove the single quotes
2. Try ToString() at the end of the decimal value

Also, make sure you have the FlexGrid bound prior to this point, in your
code. I know that may seem obvious, but I have seen it done on a project.

Hope this at least helps you track down the exception.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
Hi Rene,

It appears that you are calling the variable with apostrophes in front and
behind - if it's a decimal value, call it without apostrophes:
key = " & me.c1flexgrid1.item(cellzeile, cellspalte)

HTH,

Bernie Yaeger
 
Integer values work but if there is an decimal value ... bum
.... try also with convert it into string, same ... bum

but thx for your help
 
Hi rene,

You should use InvariantCulture or "en*" culture for formating decimal
numbers (. as decimal symbol).
You see, the 2,7 is invalid. 2.7 is right for RowFilter.
 
Back
Top