Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 26th, 2005, 08:53 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 217
Thanks: 0
Thanked 1 Time in 1 Post
Default Does reference to a table change when db split?

I have an mdb I'm trying to split and make work.

While unsplit it is running fine, (at least it does what I asked and does not throw an error) and my code appears to have compiled. (I think.)
However, once split, the opening form errors out with "3219 Invalid operation". This error ONLY comes up when I enter with the shift key. The opening form just sits there and does nothing when I launch without the shift key.

It bombs out on the line below with " Error # 3219,invalid operation"
"Set rec = db.OpenRecordset("tblAuthUsers", dbOpenTable) "


The code in the button to open the db once the person is confirmed to have a password and permissions is:

Dim db As DAO.Database
Dim rec As DAO.Recordset
Dim strUserPasswordInput As String ' hold password user gives to
Dim varFoundUserPW As Variant ' store
Dim strUserInitInput As String ' store user initials,
Dim strUserPWStored As String
Dim strUserInitStored As String
Dim intUserLevelStored As Integer

Set db = CurrentDb

Set rec = db.OpenRecordset("tblAuthUsers", dbOpenTable) '
rec.Index = "AuthID" ' set up to use seek,


I used the Link Tables Manager and it REPORTED back successful linkage.

Do I need to "hard code" the complete address (of where the table now resides on the BE as part of the argument for setting rec = dbopenrecordset? Is there something else not correct?

Thanks,
Loralee


 
Old June 28th, 2005, 04:27 AM
Authorized User
 
Join Date: Jul 2004
Posts: 46
Thanks: 0
Thanked 1 Time in 1 Post
Default

Someone far more advanced than I will probably say that this is rubbish, but I have come across this problem too (in an Access2000 project - I have not seen it in 2003, yet). I solved it by not using dbOpenTable, rather I used dbOpenDynaset and used the .Find family (FindFirst, FindNext, etc)to search the recordset. You would also not need to worry about defining indices either. You certainly do not need to put the full path into the table name.

I don't really know why, but it worked, and that's all that mattered.

 
Old June 29th, 2005, 09:03 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 217
Thanks: 0
Thanked 1 Time in 1 Post
Default

Alan,
Thanks!

I changed the offending line to openDynaset as you suggested, (and changed to .findfirst) and it works. We're split, compacted and for the first time we get a decent (1-2 second) load time!
Loralee






Similar Threads
Thread Thread Starter Forum Replies Last Post
Please give me and idea on how to split this table kennethjaysone HTML Code Clinic 0 December 3rd, 2007 05:37 AM
Pivot Table Dynamic Reference Data oyelesit Excel VBA 2 August 4th, 2006 07:28 AM
Split up table across pages rabbit124 ASP.NET 1.0 and 1.1 Basics 0 April 11th, 2006 12:23 PM
Major performance loss on split DB roniestein Access 67 October 22nd, 2004 11:55 AM
Unable to change DB values using ASP dghughes42 Classic ASP Databases 2 January 31st, 2004 02:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.