backend path syntax in intranet (1 Viewer)

rickyfong

Registered User.
Local time
Yesterday, 20:13
Joined
Nov 25, 2010
Messages
199
I have splited the system into foreend (FE) and backend (BE). FE and BE are located in different PC lying in company internat! However, I found there always give an error message 3219. And, nseems it is caused by not pointing correcly to the BE when I open tables, the syntax are as follows

Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("Invoiceyr", dbOpenTable)
rs.MoveFirst
rs.Edit
Me.THISYR = rs!Invoiceyr

The 3219 error appeared at statement "Set rs = .....". Please telling me what's the syntax of the path that I should include in the statement in order to point correctly the BE.
 
Last edited by a moderator:

pr2-eugin

Super Moderator
Local time
Today, 04:13
Joined
Nov 30, 2011
Messages
8,494
Re: backend path syntax in internat

Have you linked the Tables? Maybe you need to Relink the tables.. Also please declare variables with appropriate library..
Code:
Dim db As [COLOR=Red][B]DAO.[/B][/COLOR]Database
Dim rs As [COLOR=Red][B]DAO.[/B][/COLOR]Recordset
 

Mihail

Registered User.
Local time
Today, 06:13
Joined
Jan 22, 2011
Messages
2,373
Re: backend path syntax in internat

1) What the error message say ?
2) Is the code you show located in a FE ?
3) Have you refreshed the tables links to the BE for every FE ?
 

rickyfong

Registered User.
Local time
Yesterday, 20:13
Joined
Nov 25, 2010
Messages
199
Re: backend path syntax in internat

1. Sure. I have re-linked all the FE to the BE.
2. The VBA statements are stayed in FE
3. error message is 3219. And I don't really know what they are telling. Something like property had been replaced etc

Thanks!
 

pr2-eugin

Super Moderator
Local time
Today, 04:13
Joined
Nov 30, 2011
Messages
8,494
Re: backend path syntax in internat

Okay it would be great if we could get the actual Error message.. Just Error numbers is not helpful.. Take a Screenshot of the error.. Like

 

rickyfong

Registered User.
Local time
Yesterday, 20:13
Joined
Nov 25, 2010
Messages
199
Re: backend path syntax in internat

Sorry! The DB is in my company and I now at home!! I will posted the screen once I am at my office! Thanks!! But based on the above information, is that my problem is mainly not included the "DAO" in the statements!!? Thanks!!
 

boblarson

Smeghead
Local time
Yesterday, 20:13
Joined
Jan 12, 2001
Messages
32,059
Get rid of the part below in red.

Set rs = db.OpenRecordset("Invoiceyr", dbOpenTable)

So like this

Set rs = db.OpenRecordset("Invoiceyr")


From the help file:
If you open a Recordset in a Microsoft Access workspace (Access workspace: A workspace that uses the Access database engine to access a data source. The data source can be an Access database file, an ODBC database, such as a Paradox database, or an ISAM database.) and you don't specify a type, OpenRecordset creates a table-type Recordset, if possible. If you specify a linked table (linked table: A table stored in a file outside the open database from which Access can access records. You can add, delete, and edit records in a linked table, but you cannot change its structure.) or query, OpenRecordset creates a dynaset-type Recordset.
 

rickyfong

Registered User.
Local time
Yesterday, 20:13
Joined
Nov 25, 2010
Messages
199
Two simple questions!! Firstly, I have re-linked the tables from FE to BE. It seems without any openrecordset statement, the module could recoginze the path automatically but not module with openrecordset statement. Is this the case??

Then it also seems to me once the FE re-linked the BE, no matter where is the physical location of the BE, the Access should treat them as one system. I don't see why the system still need path to tell where is the BE!!??

Thanks a lot!!
 

rickyfong

Registered User.
Local time
Yesterday, 20:13
Joined
Nov 25, 2010
Messages
199
IT SEEMS WORKING AFTER TAKEN OUT THE "dbOpenTable", LET ME EXPLORE MORE, AND THEN GET BACK TO YOU!! THANKS!!
 

Users who are viewing this thread

Top Bottom