textbox controlsource Left and Right expression

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?
 
D

Douglas J. Steele

Do you actually have those quotes around the expressions? If so, get rid of
them.
 
P

pedro

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
 
D

Douglas J. Steele

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)
 
P

pedro

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top