Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access External data > Setting ROWSOUR...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 10897 of 11313
Post > Topic >>

Setting ROWSOURCE to an External Table

by "Roger Lord" <Roger.Lord@[EMAIL PROTECTED] > Aug 6, 2008 at 09:05 PM

Not sure if this is the proper forum, but here it goes:

I am writing an Access 2003 application in which I'm trying to 
set a listbox's rowsource to a table contained in an external 
database.  The external table is dynamically created in this 
application and is used to show the results of a query.  I can do 
this easily by filling a table in application itself (i.e., a 
table in the .mdb file I am writing), but repeated queries cause 
the size of the .mdb file to grow and grow.  In its final form, 
the application will be compiled into a .mde file for a group of 
users.  If compacting the database was easy to do in the 
application itself, that is the way I would go; but my users 
don't know anything about Access and I can't rely on them to 
compact the file.

Instead, I create an external database (C:\Temp\Results.mdb) and 
then create a table within that database (RPT_BUFFER), and then I 
fill it with data.  This part works fine.  The table gets created 
and gets filled with data exactly as planned.  When I exit the 
application, the external database/table are deleted.  That's my 
method of compacting.
The problem comes when I try to set the rowsource of a listbox in 
my main application to the external table just created.

Here's how I'm trying to do it (my listbox is named lbxResults):


Dim mSQL as String

lbxResults.RowSource = ""

 mSQL = "SELECT * FROM RPT_BUFFER IN 'C:\Temp\Results.mdb' "

 lbxResults.RowSource = mSQL



Nothing bombs, but all I see in the listbox is the column names 
(I set the listbox to show the column names).

Any ideas as to what is going wrong?

If this is not the proper forum, my apologies.  Please tell me 
which is the correct one.

Thanks.

Roger
 




 3 Posts in Topic:
Setting ROWSOURCE to an External Table
"Roger Lord" &l  2008-08-06 21:05:27 
Re: Setting ROWSOURCE to an External Table
"Chris O'C via Acces  2008-08-07 19:37:40 
Re: Setting ROWSOURCE to an External Table
"Roger Lord" &l  2008-08-07 19:58:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 17:55:50 CST 2008.