Copying Tables?

Milan

Registered User.
Local time
Today, 20:53
Joined
Feb 17, 2002
Messages
85
Hi People,

I have and table of records which is bound to a list box on a form. The table is is created via a make table query. I run the maketablequery from a button which is on the form which has the bound listbox to the table. what i want to do is run the query and then requery the list box to reflect the new data. The problem is at the moment the query will not run because the table is locked by the list box on the form. How can i run the query and update the list box to show the new records. Do i use recordset clone?.

Would appreciate any help here
 
Hi Milan,

What I would do is - in the design view leave the Row Source property of your listbox blank. In the OnClick event of your make table button, set the row source property to whatever you need right below your make table codes. May as well set row source in form_load event so that the listbox can display your table data once the form is loaded.

YourListBox.RowSource = "Your Criteria here (can be a field name or SQL statement)"

Hope it helps.

Bello
 
Thanks for that i will give that a go, seems easy enough


Thanks
 
help!!!!

lstemail.RowSource = SELECT TblEmailRecords.Name, TblEmailRecords.EmailAddress, TblEmailRecords.CategoryA, TblEmailRecords.RecipentType FROM TblEmailRecords;

I have put this code on a button, but what needs to be amended? for it to work. Where do the brackets need to go?
 

lstemail.RowSource = "SELECT TblEmailRecords.Name, TblEmailRecords.EmailAddress, TblEmailRecords.CategoryA, TblEmailRecords.RecipentType FROM TblEmailRecords;"
 
Pat,
The make table query is making a table not for the listbox, the table created will be used for process information in other tables. The list box idea on the form was to show the new recordset for that table. Sorry for not making myself a bit more clearer!
 
dcx693,

Thanks for that work perfectly!!!!!

cheers
 

Users who are viewing this thread

Back
Top Bottom