Similar Threads
1. How can I force selection of the 1st record of multiselect listbox from VB
Hi All,
I'm still stuck on this. I have a multiselect listbox in Access 2002.
I want to force the first record to be selected from VB after the listbox is
requeried. As I understand it, the value property always reads Null in this
case. Trying to set it doesn't work, so I assume this is a two way street
for multiselects.
Can anyone help?
Regards,
Max
2. Record selector's selection readable by VB? - Access Forms
3. Random record selection using VBA
4. Get value of Session in Record Selection - VB.Net
5. record selection formula for number type field
Hello Helen
>-----Original Message-----
>vb .net 2002
>crystal 9
>
>Hi:
>I have the formula working for strings and dates, but am
unable to get results successfully for number/currency
>
>Code for string type field (can be alphanumeric):
>
> SelectFormula = "LowerCase({LINE_ITEM.CLIN_DESC})
LIKE '*" & txtDesc().Text.ToLower & "*' or LowerCase
({LINE_ITEM.CLIN_EXT_DESC}) LIKE '*" & txtDesc
().Text.ToLower & "*' or LowerCase
({PROC_OBJECT_1.DOC_TITLE}) LIKE '*" & txtDesc
().Text.ToLower & "*'"
>
>Code for date type field:
>
> SelectFormula = "{LINE_ITEM.PERF_END_DT} " &
ListBox1.SelectedItem & " #" & txtDate().Text & "#"
>
>Both working!
>
>BUT
>
>Number type field for currency (could be double)
>fails
>
>Have tried many variations, no success, here's the
latest:
> ' SelectFormula = "{CLIN_FUND.FUND_AMT} = " &
ListBox1.SelectedItem & " '" & TextBox1().Text & "'"
>
I think the problem you are concatening the wrong number
of parameters ... Maybe you want to try :
SelectFormula = "{CLIN_FUND.FUND_AMT} = " &
ListBox1.SelectedItem.ToString()
or
SelectFormula = "{CLIN_FUND.FUND_AMT} = " & TextBox1
().Text
or
SelectFormula = "{CLIN_FUND.FUND_AMT} = " &
ListBox1.SelectedItem.ToString() & " or
{CLIN_FUND.FUND_AMT} = " & TextBox1().Text
When you are using numbers don't use ' in the selection
formula.
Kind Regards
Jorge
>What's wrong, please?
>
>For the latter (currency), my runtime hard coded dataset
does a dim:
> Dim CLIN_FUND(,) As String = {{"50000"}}
>(I've tried integer, double, no luck)
>
>In Public Class, I dim
> Dim item As String
>(have tried integer, double, no good)
>
>My recordselection in crystal is:
>{CLIN_FUND.FUND_AMT} = ToNumber("456");
>(have tried CDbl, CStr, CCur, many varieties, nothing
works)
>
>Am I missing something very simple here?
>
>Thanks for your help ...
>
>-H
>.
>
6. Crystal Record Selection Formula - Distinct Values? - VB.Net
7. Record Selection Formula
i have the folowing code
Dim y As New frmCobranz
Dim MyReport As New RPTCobranz
MyReport.DataDefinition.RecordSelectionFormula = "{CobH.RelNbr}= y.txtNoRelac.Text
CrystalReportViewer1.ReportSource = MyRepor
when run the report the following error rais
error in formula <record selection
'{cobh.relnbr}=y.txtnorelac.text
a number, currency amount, boolean, date, tieme or string is expected her
i don't know how to assign a value to a record selection formula
8. Selecting top 15 records for multiple selections via VBA - Excel