How do I Refer to another database record. Would I use SQL? what is the syntax if I know the path and name of db, the table name, and I guess the record wor\uld be criteria?
You need to dimension and set references to the other db. method and syntax are the SAME as refering to current db, argument for the db needs to be the whole entire complete path filename (incl ".MDB". There after, the objects (tables and queries) appear and operate the same as local objects. This is the "classic" for splitting a db into front/back end, so look at references for this for additional help.
MichaelRed
redmsp@erols.com
There is never time to do it right but there is always time to do it over
This is my code and vNetWorkPath is a full path with ".mdb"
***************
Public Function GetSecurityOnOff(vNetworkPath)
GetSecurityOnOff = "On"
Dim vSecurityValue
Dim dbs As Object
Dim vRecordset As Object
Set dbs = vNetworkPath
SQLstring = "SELECT DefaultSettings.*, DefaultSettings.DefaultID FROM DefaultSettings WHERE DefaultID = 'SecurityOn'"
Set vRecordset = dbs.OpenRecordset(SQLstring)
With vRecordset
vSecurityValue = ![DefaultValue]
End With
Set vRecordset = Nothing
Set dbs = Nothing
End Function
******************
I get a "Object does not support this property or method" error. I guess cause it's seeing "networkpath".Openrecordset(SQLString) which isn't correct
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.