Oleg_123 at xuppa.com
Oleg_123 at xuppa.com
Tue Jun 29 13:20:57 CDT 2004
there is an error in my select statement how do i make a field name equal to whats in a textbox ? Dim rs As ADODB.Recordset Dim cn As Connection Dim aBOF Dim aField Dim sAppsID Dim sEntID Dim sAttribID sAppsID = txtAppsId sEntID = txtEntID sAttribID = txtAttribID Set cn = CurrentProject.Connection Set rs = cn.Execute("SELECT Testing.AttribXrefGrpNumber FROM Testing WHERE (((Testing.AppsID)=sAppsID) AND ((Testing.EntID)=sEntID ) AND ((Testing.AttribID)=sAttribID))") aBOF = rs.BOF 'check if string is Empty If aBOF = True Then MsgBox "Record Does not exist" Exit Sub Else aField = rs.Fields(0) MsgBox "Record alredy exists. Group # is " & aField End If ----------------------------------------- Make Money and Find Love at Finally.com http://www.finally.com/?link=webmail