|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
problem with record set
I'm trying to query some data in an Access Data Project (.adp). First I build the SQL string based on user input. Part of that input defines a field to select rather than just values so I'm using a make-table query. Here's my code:
'Build SQL statement based on user input 'Query is a make-table query (needed because the user 'input defines a field to include in the results '<snip> 'First delete the table (tblqryInvertDataSummary) 'Must add code to check if this table exists DoCmd.DeleteObject acTable, "tblqryInvertDataSummary" 'Execute the SQL statement DoCmd.RunSQL stSQL 'Refresh db DoCmd.DoMenuItem acFormBar, acEditMenu, acRefresh, acMenuVer20 'Open the new table DoCmd.OpenTable "tblqryInvertDataSummary", acViewNormal, acReadOnly When this runs, I get an error message saying "Microsoft Office Access can't find the object tblqryInvertDataSummary". The SQL is running fine but the table won't open. If I click the menu items View-Refresh, the table shows up in the table list and when I open it, the results are there as expected. I just need to have the table automatically open. Any ideas? Thanks, Doug |
|
#2
|
|||
|
|||
|
I'm having the same problem Doug. Did you end up working out how to fix it?
Quote:
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > problem with record set |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|