Len(Me.Lot_no)

  • Thread starter Thread starter shiro
  • Start date Start date
S

shiro

I put below code in my project :
Debug.print Len(Me.Lot_no)
In immediate window,I found that
there are spaces on the front and
behind of the len.
like: space5space
..I think,this condition cause the fail
of my code execution.

I have below code in Form's before update
If Len(Me.Lot_no) <> Me.cbo_Product.Column(1) then
Cancel = True
MsgBox "Invalid lot no"

I try put :
Debug.Print Me.cbo_Product.Column(1)
and it return 5 without space anywhere.

So the form updating keep fail anytime.How
to solve this problem.?Thank's for help.
Rgds,

Shiro
 

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

Back
Top