473,416 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

problem creating recordset from two tables

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
3 3887
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ilan Sebba | last post by:
When it comes to adding records in related tables, Access is really smart. But when I try to do the same using ADO, I am really stupid. Say I have two parent tables (eg Course, Student) and one...
2
by: Chris via AccessMonster.com | last post by:
I have done something like this a million years ago my developer skills have diminished to nothing but now I am at a new job trying to regroup what I lost. This one came across my desk recently. I...
6
by: lenny | last post by:
Hi, I've been trying to use a Sub or Function in VBA to connect to a database, make a query and return the recordset that results from the query. The connection to the database and the query...
2
by: corepaul | last post by:
I am fairly new to Access and I have a problem trying to use bookmarks with a recordset. I have a recordset dimensioned as, Dim rstFoodDesc As ADODB.Recordset ' recordset Dim bMark As...
8
by: Dave Hagerich | last post by:
I'm using a DataGrid with a DataSet and I'm trying to filter the data being displayed, using the following code as a test: DataView theView = new DataView(theDataSet.Tables); theView.RowFilter =...
3
by: Richard Thornley | last post by:
Hello, I need some clarification in creating objects. Consider the following code... (note: The function InitializeListCombo initializes the combobox) Private daLists As New...
0
by: EiEiO | last post by:
Hello all. I am hoping I could get some suggestions on moving forward. My Challenge: Importing data from one table to another where the field names almost never match. My Form has a list...
17
by: radio1 | last post by:
Configuration: Access 2002 and SQL Server 2000 using a .ADP Project. I would VERY MUCH appreciate anyone's input into this problem I'm having. I have a form in Access that does not permit...
0
by: magickarle | last post by:
Hi to all. Little introduction on what I'm trying to do: I'm in charge of creating an access database for our supervisor where they can grade their agents. Per ex: agents are talking to customers...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.