Como saber si esta repetido el registro q estoy por ingresar
Tengo q buscar un recordset y compararlo con el q estoy por ingresar
si es igual me avisa "q desea hacer"
si no "lo ingresa"
Mi problema esta en la busqueda y comparacion
yo hice esto pero no funciona
intNInterno = frmProducto.AdoProducto.Recordset!NInterno
'
AdoAltasPedido.RecordSource = "Select * from Pedidos where NroInterno = " & intNInterno
'
If AdoAltasPedido.Recordset!NroInterno = intNInterno Then
Re: Como saber si esta repetido el registro q estoy por ingr
Si se recupera adecuadamente la variable intNInterno y éste es de tipo NUMERICO, lo siguiente debe funcionarte bien:
Código:
intNInterno = frmProducto.AdoProducto.Recordset!NInterno
'
AdoAltasPedido.RecordSource = "Select * from Pedidos where NroInterno = " & intNInterno
'
If AdoAltasPedido.RecordCount > 0 Then
MsgBox "esta pedido"
End If