Hi Carmen,
I take it that cobh.relnbr is a table.column and that y.txtnorelac.text is a
textbox (although I don't understand the double dot part). In any event,
here's how to construct the recordselectionformula - it has to be values,
not variables. Thus:
"{CobH.RelNbr}= " & chr(39) & y.txtNoRelac.Text & chr(39)
Thus the formula would appear in crystal to be "{CobH.RelNbr}= '12345-009' "
(example of an account #).
HTH,
Bernie Yaeger
"carmen" <cd*****@diario.com.mx> wrote in message
news:A4**********************************@microsof t.com...
i have the folowing code:
Dim y As New frmCobranza
Dim MyReport As New RPTCobranza
MyReport.DataDefinition.RecordSelectionFormula = "{CobH.RelNbr}=
y.txtNoRelac.Text" CrystalReportViewer1.ReportSource = MyReport
when run the report the following error raise
error in formula <record selection>
'{cobh.relnbr}=y.txtnorelac.text'
a number, currency amount, boolean, date, tieme or string is expected here
i don't know how to assign a value to a record selection formula