S
shiro
I have code on before update event of my form,
but can't work.The form's data source is DProd_tbl.
Which have 2 fields Code and PName.
On my form,there are txt_PCode and cbo_PName
..The selected value of cboPName is saved to the
field PName.The row source of cbo_PName is from
another table (MName_tbl) which have 2 fields:
MName and Len MName.(MName data type is Number)
I want to control the number of character being
inputted to the txt_PCode must be same with the value
on the column(1) of cbo_PName (column 1 is MName)
so I write the code:
If Len(Me.txt_PCode) <> Me.cbo_PName.Column(1) Then
Cancel = True
MsgBox "Invalid PCode"
Else
End If
But it always invalid although the len of the character =
value on column(1) of cbo_PName.
What's wrong?Hope some like to advise.
tHANK'S
Rgds,
Shiro
but can't work.The form's data source is DProd_tbl.
Which have 2 fields Code and PName.
On my form,there are txt_PCode and cbo_PName
..The selected value of cboPName is saved to the
field PName.The row source of cbo_PName is from
another table (MName_tbl) which have 2 fields:
MName and Len MName.(MName data type is Number)
I want to control the number of character being
inputted to the txt_PCode must be same with the value
on the column(1) of cbo_PName (column 1 is MName)
so I write the code:
If Len(Me.txt_PCode) <> Me.cbo_PName.Column(1) Then
Cancel = True
MsgBox "Invalid PCode"
Else
End If
But it always invalid although the len of the character =
value on column(1) of cbo_PName.
What's wrong?Hope some like to advise.
tHANK'S
Rgds,
Shiro