Private Sub view_Click() Dim name, nme As String nme = rs!NameofTest name = CInt("&H" & nme) Select Case name Case name If name = 1 Then If Text19.Text = glucose.Caption Then display End If ElseIf name = 2 Then If Text19.Text = chol1.Caption Then display End If ElseIf name = 3 Then If Text19.Text = bun1.Caption Then display End If ElseIf name = 4 Then If Text19.Text = crtn1.Caption Then display End If ElseIf name = 5 Then If Text19.Text = urea1.Caption Then display End If End If Case Else: MsgBox "Record not Found..!!" Text19.Text = "" End Select If rs.EOF = False Or rs.BOF = False Then Do Until rs.EOF = True Or rs.BOF = True rs.update rs.MoveNext view_Click Loop Else MsgBox "no Matching Record" End If End Sub
nme = rs.NameofTest
rs!NameofTest
rs.Fields("NameofTest").Value
.Fields
.Value
rs("NameofTest")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)