View Single Post
  #18  
Old January 25th, 2009, 10:54 PM posted to microsoft.public.access.forms
Orna
external usenet poster
 
Posts: 18
Default Dynamic recordset

Hi,

As I mentioned in my previuos post, the reason why I don't use an sql
statement is because I need to join data from a local table and a remote
table. the remote table is not a linked table, for each row in the list box I
regenerate the connection string.

Orna.

"David W. Fenton" wrote:

=?Utf-8?B?T3JuYQ==?= wrote in
:

I have a form with a listbox control, the listbox displays access
db file name in a specific directory, each database has only one
table with the same name and exact schema but with different data.
each time the user double clicks on one of the rows in the
listbox, a dialog form opens and displays the data in the table.
when I use an ADODB recordset object to view the data in the
remote database, it works ok. but if I use a recordset I generated
in my code (with additional fields) , I get the correct number of
records but the data displayed in each one of the text boxs is
"#Error".


Why are you choosing an ADO recordset? You might want to review this
article, which was written after Access 2000 came out (and perhaps
the noneditable nature of and ADO form Recordset has changed):

http://trigeminal.com/usenet/usenet022.asp?1033

Also, why not just set the form's recordsource to an appropriate SQL
string (which can include a connect string if you need to use
different back ends)? Why bother with all the trouble of setting up
a recordset in memory when assigning a SQL string to the form's
Recordsource will do all that for you?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/