PDA

View Full Version : Problem in compare string


jenagan
Oct 26, 2005, 09:23 PM
I'm trying to compare a existing with other string retriving from databse , Its not get into the if statement even there is a data retrive same as existing one...

Dim epf_no As String
Dim epf_no_frmdb As String

epf_no = "1022"

Adodc2.Refresh

With Adodc2.Recordset
Do Until Adodc2.Recordset.EOF
epf_no_frmdb = !EPFno
If epf_no = epf_no_frmdb Then
txtName.Text = !name
End If
.MoveNext
Loop
End With


can anyone please give better solution to compare strings..

ScottGem
Oct 27, 2005, 07:38 AM
First, it would help if you indicated what language or platform you are working with. It appears you may be using VB or Access VBA, but I'm not sure which. Second, you need to explain what you want to do if they are equal or not equal.