Errors caused by not using linked tables? (1 Viewer)

Alc

Registered User.
Local time
Today, 03:42
Joined
Mar 23, 2007
Messages
2,407
I have a separate front and back end for my database. I`m trying to merge them into one application, for easier distribution to users, but I`ve found that things that worked previously now produce errors, even though all I`ve done is import the tables as opposed to linking to them.

For example, the line:

Forms!Referrals!Paycode = str_Paycode

works perfectly if using linked tables, but if the links are all removed and the exact same tables are imported, I get the message 'Object invalid or no longer set'.

Is there some difference between linked and 'in-built' tables that I'm missing? I'm largely self taught and have tended to learn things as I needed them, so I may have missed something important.

Any suggestions gratefully received.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:42
Joined
Feb 19, 2002
Messages
42,981
What is str_Paycode? is it a control on a form? if so it should be referenced as Me.str_Paycode. Is it a variable? Is it a field in a recordset? If so it should be referenced as rs!str_Paycode.

There isn't any difference between linked and local tables that would cause this type of problem. Does the code compile? Have you set Option Explicit to force declaration of all variables?

In the long run, you will be better off with a split database even if the data is not shared by multiple users. With a monolithic database, you will not be easily able to distribute FE updates. You'll need to either wipe the user's data with a complete replacement, or you'll need to customize the distribution so you can save each user's data.
 

SOS

Registered Lunatic
Local time
Today, 00:42
Joined
Aug 27, 2008
Messages
3,517
You wrote:

Forms!Referrals!Paycode = str_Paycode

But where and what is str_Paycode? Is it a variable? If so, does the form Referrals have the field Paycode in its record source and you might need to just reselect it to make it work. Shouldn't have to but sometimes Access does weird things.
 

Alc

Registered User.
Local time
Today, 03:42
Joined
Mar 23, 2007
Messages
2,407
Sorry for not being clear.

str_Paycode is a string variable that gets set earlier. At that point, I'm assigning its value to a field called Paycode on a form called Referals.

The reason I have to merge the front and back end is that the application needs to be sent out to people not on our network (usually on flash drives). Given their lack of computer knowledge, I know I couldn't talk them through remapping the back end, should the drive letter change. Having front and back merged will just be easier.

As I say, the problem works as follows:
I use separate front and back ends with linked tables: no error message.
I remove all links and import the tables: error message.

I've repeated this process two or three times now (out of desperation), so I can be sure I'm not changing anything else in the database.
 

Users who are viewing this thread

Top Bottom