Looping through tables in access database

Thank you, this was exactly the type of code I was looking for. Its so obvious, I'm just not very confident in Access as I am in Excel.

I've tried that line in my code, and I get "subscript out of range" error message. I've define strsql as string, so why am I getting this message?
 
no, its shut. should it be open?
 
Yeah you can't get a value out of a combobox in a closed excel spreadsheet.
 
so how do I open the worksheet in access, and retrieve the information.

Also, wouldn't this slow down my database if I have to do about a hundred a month?
 
Do a few searches on the forum as your going to have to come up with some code to find and then loop through each workbook.

Why not just store the information in cells in excel instead of a comboboxes and textboxes?

If you had all the information in a single excel spreadsheet you could just create a named range for it and then import it with a simple bit of SQL.

In all honesty I don't even know if a value entered into a textbox in excel is retained after a spreadsheet closes.
 
Thanks Chergh, the value in a combobox is retained.

Just finally, I've found something to open the file. Next error is in the syntax you gave. any ideas.

Otherwise, I'm just going to redesign this whole thing. i thought it should be easy enough to pick up data, but its causing more troubles than its worth!

Thanks!
 
Post all the actual code you have so far and I'll take a look at it this weekend, I'm off down the pub.
 

Users who are viewing this thread

Back
Top Bottom