i try to do this but it makes an error Dim conn As New ADODB.Connection Dim rs As New ADODB.Recordset conn.Open “nav” Set rs = conn.Execute(“Select * from Customer”) Text23 = rs(“IdCustomer”) RUN TIME ERROR 3021 HOW CAN I DO THIS?

This usually relates to no current record. You need to modify the code to test bof/eof, don’t do VB enough anymore to help more. The tek-tips site has a VB forum that has covered this in detail. Good luck.

thanks, but te table has records…

The link below has 3 references to your 3021 error. It should allow to find the solution, I hope!

thanks, i’ll try