Hi all,
I'm trying to return some rows into a textbox on my form. Problem is that if it searches for the uniwue id and find that there are no rows to return i get an error saying: No current reccord.
Here's what i've got.....
Now i'm pretty sure i need to have an if statment at the start that says something like 'if rs.has no record to return then exit sub...else', but i'm not sure of which function i need.
Can someone point me in the right direction please.
Cheers,
Spinkung.
I'm trying to return some rows into a textbox on my form. Problem is that if it searches for the uniwue id and find that there are no rows to return i get an error saying: No current reccord.
Here's what i've got.....
Code:
rs1.MoveFirst
Me.comments.Value = ""
Do
Me.comments.Value = LTrim(RTrim(rs1("comments").Value)) & vbCrLf & Me.comments.Value
rs1.MoveNext
Loop Until rs1.EOF
Now i'm pretty sure i need to have an if statment at the start that says something like 'if rs.has no record to return then exit sub...else', but i'm not sure of which function i need.
Can someone point me in the right direction please.
Cheers,
Spinkung.