![]() |
|
|
|||||||
|
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I recently migrated some backend data from a local access MDB to SQL Server. Because of the use of link tables, the existing ADO style updates were horribly slow.
So I swapped out the code for DAO and reduced the insert time from 11 seconds to less than one. However, later in the execution, when the VBA code for one of the forms attempts to reference a field within the same form, the txtField.Value renders "You entered and expression that has no value" In an "all things equal" branch that keeps the ADO there is no such problem. the code changed from the form: Code:
Set dbOrgDB = DBEngine.Workspaces(0).Databases(0)
Set snTbl = dbOrgDB.OpenRecordset(sTable, DB_OPEN_TABLE)
....
snTbl.AddNew
...
snTbl.Update
Code:
Set dbOrgDB = DBEngine.Workspaces(0).Databases(0)
Set snTbl = dbOrgDB.OpenRecordset(sTable, DB_OPEN_DYNASET) --only used to determine # of fields....
tempSQL = "INSERT INTO .............."
CurrentDb.Execute tempSQL
|
|
#2
|
|||
|
|||
|
AND resolved, logic error :-D
|
|
#3
|
||||
|
||||
|
Great! Do you want to go ahead and mark this thread Solved with the thread tool?
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
| Bookmarks |
| Tags |
| action query, dao |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Controls go blank on empty query result | kevdfisch | Programming | 4 | 08-25-2009 06:07 AM |
| Option Group broken out | dcecil | Reports | 3 | 04-21-2009 08:30 AM |
| Add new Recordset using Recorset by Query | gailoni | Programming | 1 | 10-22-2008 09:52 PM |
| Result of Count Query not known elsewhere | Carole | Access | 1 | 09-07-2008 07:39 AM |
| criteria to limit # of characters in a query result. | valdense | Queries | 2 | 08-04-2008 02:16 PM |