Use query stored in code library (1 Viewer)

mcdhappy80

Registered User.
Local time
Today, 16:01
Joined
Jun 22, 2009
Messages
347
I have a query that fills a combo box in 5 of my front end applications.
I was wondering would it be practical to store it in code library (one place) and then reference in FE-s?
Can someone explain how do I bind that query to be the combos record source?
Thank You
 

Simon_MT

Registered User.
Local time
Today, 15:01
Joined
Feb 26, 2007
Messages
2,177
like this Function which in the FE and is based on a query:

Code:
Function LookupArtist()

    With Screen.ActiveControl
        .RowSource = "SELECT ArtistsLookup.Artist, ArtistsLookup.[Artist Short], ArtistsLookup.[Artist Client No] FROM ArtistsLookup;"
        Call ListDisplay 'DropDown
    End With

End Function

Simon
 

mcdhappy80

Registered User.
Local time
Today, 16:01
Joined
Jun 22, 2009
Messages
347
I was thinking more like, create a query, store it in one place (maybe back end db, the tables that query uses are in the same database, but are also linked by the FE, as the query itself should be) and then link to it from different front ends.

Can queries (from the BE db) be linked to (like tables can)?
If can, please give a sample how?

Thank You.
 

Simon_MT

Registered User.
Local time
Today, 15:01
Joined
Feb 26, 2007
Messages
2,177
I understand that you can only link tables so the application objects need to be in the FE.

Simon
 

Users who are viewing this thread

Top Bottom