J
jfp
I am moving code from an app into a library prior to delivery of the app
and have now encountered this problem.
In the app there is a table (call it "VP")
From the app i launch a form in the library.
As part of the Open procedure for the form, i set the recordsourcetype
for a list box to "Table/Query" and i set the recordsource to a simple
query on table VP ("Select [VP].field1, ...)
When this form was in the app (prior to moving stuff into the library)
this worked fine. With the form in the library, the listbox comes up
empty. If i set a breakpoint, get into the immediate window, and attempt
a Requery on the listbox, i get an error that the table does not exist.
However -- if in the same part of the code i add this:
MsgBox "VP has " & NRecords("VP")
(here, NRecords is a simple function in the library that returns the #
of records in a table) i get a messagebox with the correct answer.
SO --
1) code on the form in the library can access the table in the app,
2) a listbox on the form in the library cannot.
Does this make sense -- or am i doing something wrong ?
and have now encountered this problem.
In the app there is a table (call it "VP")
From the app i launch a form in the library.
As part of the Open procedure for the form, i set the recordsourcetype
for a list box to "Table/Query" and i set the recordsource to a simple
query on table VP ("Select [VP].field1, ...)
When this form was in the app (prior to moving stuff into the library)
this worked fine. With the form in the library, the listbox comes up
empty. If i set a breakpoint, get into the immediate window, and attempt
a Requery on the listbox, i get an error that the table does not exist.
However -- if in the same part of the code i add this:
MsgBox "VP has " & NRecords("VP")
(here, NRecords is a simple function in the library that returns the #
of records in a table) i get a messagebox with the correct answer.
SO --
1) code on the form in the library can access the table in the app,
2) a listbox on the form in the library cannot.
Does this make sense -- or am i doing something wrong ?