By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

problem creating recordset from two tables

P: n/a
Hello

I'm using A97 and i'm having some trouble with creating a recordset
with data from two different databases.

I connect to a remote database and make this data the default source
for my continuous form (Set me.recordset = rs). The problem is: one of
the fields of the remote database is a foreign key (two digit number),
and the table with the correspondence is in my local database... i
have no way of altering the remote database. And i need it to be on
the recordset, as it is the source of my form.

Any ideas on what steps should i take?

Thanks so much

Bruno Luis
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Given the case you describe *exactly* as it is, I would use unbound
forms and get the data from the local table in SQL using the FK from the
rs.record of interest.
If I really wanted to use bound forms I'd find another way to get server
datya, like linked tables.

Pavel

Bruno Luis wrote:

Hello

I'm using A97 and i'm having some trouble with creating a recordset
with data from two different databases.

I connect to a remote database and make this data the default source
for my continuous form (Set me.recordset = rs). The problem is: one of
the fields of the remote database is a foreign key (two digit number),
and the table with the correspondence is in my local database... i
have no way of altering the remote database. And i need it to be on
the recordset, as it is the source of my form.

Any ideas on what steps should i take?

Thanks so much

Bruno Luis

Nov 12 '05 #2

P: n/a
But how can i create a bound form? How can i link a local table to a
remote table by code?

Thanks

Bruno Luis
Pavel Romashkin <pa*************@hotmail.com> wrote in message news:<3F***************@hotmail.com>...
Given the case you describe *exactly* as it is, I would use unbound
forms and get the data from the local table in SQL using the FK from the
rs.record of interest.
If I really wanted to use bound forms I'd find another way to get server
datya, like linked tables.

Pavel

Bruno Luis wrote:

Hello

I'm using A97 and i'm having some trouble with creating a recordset
with data from two different databases.

I connect to a remote database and make this data the default source
for my continuous form (Set me.recordset = rs). The problem is: one of
the fields of the remote database is a foreign key (two digit number),
and the table with the correspondence is in my local database... i
have no way of altering the remote database. And i need it to be on
the recordset, as it is the source of my form.

Any ideas on what steps should i take?

Thanks so much

Bruno Luis

Nov 12 '05 #3

P: n/a
The main form does not have resord source at design time. You still can
make controls on the main form bound to field names in the remote
recordset, although they will not work unless you do provide the
recordset at load time. Make a hidden textbox that has FK as its record source.
However, your local data seems to have related records to be displayed
in a subform. Bind the local data to the subform and link its key field
to the hidden textbox of the main form that contains the FK.
Once you attach the rst in the Load event, the form/subform will operate
as expected.
Cheers,
Pavel
P.S. I may have mixed which dataset is One and which is Many, but it
doesn't matter. Basically, lay out the Form/Subform as if both datasets
were local and link their Parent/Child fields. Then remove the
recordsource for the remote-based form and attach it in the Load event.

Bruno Luis wrote:

But how can i create a bound form? How can i link a local table to a
remote table by code?

Thanks

Bruno Luis

Pavel Romashkin <pa*************@hotmail.com> wrote in message news:<3F***************@hotmail.com>...
Given the case you describe *exactly* as it is, I would use unbound
forms and get the data from the local table in SQL using the FK from the
rs.record of interest.
If I really wanted to use bound forms I'd find another way to get server
datya, like linked tables.

Pavel

Bruno Luis wrote:

Hello

I'm using A97 and i'm having some trouble with creating a recordset
with data from two different databases.

I connect to a remote database and make this data the default source
for my continuous form (Set me.recordset = rs). The problem is: one of
the fields of the remote database is a foreign key (two digit number),
and the table with the correspondence is in my local database... i
have no way of altering the remote database. And i need it to be on
the recordset, as it is the source of my form.

Any ideas on what steps should i take?

Thanks so much

Bruno Luis

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.