Do querys break between form & successfully linked front and backe

J

John Phelan

My problem may have more to do with a break with the use of query files under
certain circumstances. There is no “front-end†to “back-end†linking problem
per se. You can see all the link tables under Table Objects and query files,
but the query files can’t seem to find the selected fields clearly listed in
the table being used in the file.

While I raise questions below; I can’t help but wonder if it is really a
question of using conflicting methods, or simply when you do use some methods
you can’t use others.

I have re-outlined everything below for, what I hope is, greater clarity:

Goal: To improve an application's performance.

The application has a front and back-end. There is no SQL server involved. I
use a module for, seeking out the back-end and automatically linking to the
back-end in order that I might be able to provide updates.

Form Structure -

First let me define my application’s form structure. I have a number of,
what I call, “Navigation (unbound) Forms†that are used to open up other
Navigation Forms; each containing hyperlinks for navigation to the other.
Each, Navigation Form represents a different application module; with a tab
control.

Each tab control has a bound application form, (main and a sub-form).

Many of these forms use fields, for collecting different information, from
the same table used in different ways. I did not want to bring back all the
fields when the same table is used in any of two are three bound forms.

The methods I have used on bound applications forms raises the question of
possible conflict when I try to use them together:

A. Combo Boxes:

1. Set the, “Limit to List†to: YES
2. Set the, “Auto Expand†to: NO
3. Based ALL combo boxes on query files

B. Main and Sub forms:

1. Use forms based on tables requiring the use of all the fields of that
table,

2. Used forms based on query files using only certain fields of that table
required,
Under these situations, there are tables containing only certain other
fields that are required in other forms.
3. Filter Lookup is set to, “Never†for control fields based on tables
(bound forms).

Problem:
When I base either a main form or a sub-form on a query file (created in
the, form property, “Row Sourceâ€), that particular form no longer links to
the back-end database table via the query files, upon my importing everything
into a new/fresh version of a front-end application, and

Whenever I open up the query files of that form, I get an error message
above each of the fields indicating it can't fine the field even though the
table is listed above with all the fields. I get the following error message:
"expr1#fieldname" in place of the field name from the table clearly listed
above. Also, If I look under the, “Tables Objectsâ€, in MS Access, all the
tables are listed there for each of the query files.

Could the problem be in part, setting the Filter Lookup to, “Never†for
control fields based on forms; or is it in what I am calling an unbound
navigation form, a main and sub form? Finally, what affect will this have on
my use of adapting code from FMS Tips, “Tip #10: Late Bind Sub forms on Tab
Controls�

C. Tab Control (I have not used this method yet, for which I have other
questions calling for another posting and topic):
The document stated that, “Using the following code, you can leave the
subform unbound, until the user clicks on the tab. This on-demand technique
will allow the main form to load without trying to populate all of the
subforms.â€
Private Sub tabStuff_Change()

Select Case tabStuff.Pages.item(tabStuff.Value).Name

Case "pg1"
If Len(sfrm1.SourceObject) = 0 Then
sfrm1.SourceObject = "frmStuff_1"
sfrm1.LinkChildFields = "StuffID"
End If

Case "pg2"
If Len(sfrm2.SourceObject) = 0 Then
sfrm2.SourceObject = "frmStuff_2"
sfrm2.LinkChildFields = "StuffID"
End If

'Repeat for each tab

End Select

End Sub

One question that I have in mind here is; whenever I resolve my linking
problem using query files, will the above piece of code produce the same
problem because I am using query files?

John
 
Top