textbox controlsource Left and Right expression

  • Thread starter Thread starter pedro
  • Start date Start date
P

pedro

Hi,

I have in my table a field which contains values like '107/000001'. I
trying to split up this value into two textboxes using the left and
right expression in the control source.

textBox1.controlSource : '=Left(Loans!LoanId; 4)'
textBox2.controlSource : '=Right(Loans!LoanId; 6)'

When displaying the form I get this as content of the textboxes
'#Name?'

Does anyone know why?
 
Do you actually have those quotes around the expressions? If so, get rid of
them.
 
No, lols, it was just to indicate what I set as value.

Still looking for the solution, I tried:

=Left(LoanId;4)
=Left([LoanId]; 4)
=Left([Loans]![LoanId]; 4)

Loans is the table and LoanId is the field ...

Anyone ?? .... thanks in advance
 
I'm assuming that your regional settings are such that you need to use ; in
the Left function, rather than the more usual ,

What is LoanId: a field in the form's recordset, a control on the form, or
something else? If it's supposed to be a field in the form's recordset, make
sure that you're not trying to do this on a control named LoanId. (rename
the control to something else). You might also try:

=Left(Me.[LoanId]; 4)
 
Thanks,

Indeed there was another control created by access named LoanId,
removed the control and changed the expression to =Left([LoanId]; 4)
as loanId is part of my form recordSet.

Thanks for the help, greetz
 
Back
Top