Visual Basic - Problema con un Combo1.Additem

Life is soft - evento anual de software empresarial
 
Vista:

Problema con un Combo1.Additem

Publicado por GROVAL (225 intervenciones) el 05/03/2003 16:23:07
GRACIAS POR ATENDER MI LLAMADO.... SOY INEXPERTO EN ESTO PERO CON GANAS DE APRENDER... NECESITO QUE EN EL COMBO1.ADDITEM CONECTARLO CON LOS REGISTROS DE CAMPO1 DE UNA TABLA.. COMO LO HAGO.. ??
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Problema con un Combo1.Additem

Publicado por J2ML (464 intervenciones) el 05/03/2003 17:15:16
Eso creo que te lo habían respondido abajo pero:
1.- Creas un objeto recordset rst (esto es con tu claúsula SQL y la sentencia DISTINCT para evitar repeticiones del campo).
2.- luego para rellenar el combo1 con los elementos de ese recordset:
If not (rst.eof) and not (rst.bof) then
rst.movefirst
while not rst.eof
combo1.additem rst.fields("nombre del campo")
rst.movenext
wend
Else
msgbox "El recordset no tiene registros..!",vbexclamation,"RST Vacío"
End If

Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar