Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mystery code! 1

Status
Not open for further replies.

SmallTime

Technical User
May 17, 2004
127
GB
Me.DBPathTXT = DLookUp("Database", MSysobjects", "[Flags] = 2097152")

This mysteriously appeared on my main menu’s OnOpen event! Can anyone work out what it’s doing? Or event better still any ideas how it might have got there?

Bizzar no!
 
It's looking up the path to Access tables that are linked from other databases. Seems a bit problematic though since you can have links to more than one external access database.

How it got there ... beats me.
 
Thanks Golom,

Just seemed so odd since I'm still developing the app. and haven't yet split the tables form the FE.

Still scratching my head as to how this got there. Anyhow seems harmless enough.

Take care.
 
Have you perhaps borrowed any code from Ian Mayor aka ProgramError on this forum? I say this because he posted the following here quite recently:

Thought this may be useful to someone. I usually work on a copy of the backend tables so I dont do any damage to the original data, but occasionally want to make sure the frontend is working correctly with the original backend data. So things can get confusing. here's a way of displaying the linked table path of the first table.

create a textbox called DBPathTXT on a form.

The code below looks for the first occurance of a table in the system(hidden) tables and returns the back end path it is pointing to in the textbox.

Useful for checking where the linked table manager has linked to the backend tables.

Me.DBPathTXT = DLookup("Database", "MSysObjects", "[flags] = 2097152")

Ian Mayor (UK)


You'll notice that the statement is identical, including the user defined variable DBPathTXT.

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
Knew I'd seen this somewhere. Nice call. However, I didn't use the code in this app, but did in another.

I'm gonna give you star just for having such a fantastic recall.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top