I think this little piece of code might cause trouble:


For xNext = 0 To fgdCompany.Rows
fgdCompany.Row = xNext
If xNext = fgdCompany.Rows Then
MsgBox "Record not found"
...