473,729 Members | 2,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3911
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******* ********@hotmai l.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******* ********@hotmai l.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
4332
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 child table (StudentProgress). The course progress records how a student progresses on a course. I have one course (History) and one student called Maya. I now want to record her grade (64). If I do this in Access using a form, then the form...
2
1907
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 need to create tables based on grouped recordsets the additional challenge is that the table name would equal the value or variable of the grouped recordset. Example below Field_1 Field_2 Field_3 email@email.com Boston ...
6
6553
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 works fine, but passing the resulting recordset back to the sub's caller is not working out.
2
8608
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 Variant ' variable to store bookmark I open the recordset with the statements,
8
3893
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 = "'Record ID' = '0'"; theView.RowStateFilter = DataViewRowState.ModifiedCurrent; Debug.WriteLine(string.Format("RowFilter = {0}", theView.RowFilter)); RecordDataGrid.DataSource = theView; RecordDataGrid.DataBind();
3
1600
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 OleDbDataAdapter
0
1424
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 box, (this is the FROM table), that lists tables in the currentDb. Also, multiple comboboxes to and to .
17
11714
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 the user to add/change/delete any data, apparently as a result of adding a GROUP BY clause to a View used indirectly as the form's Record Source. I really don't believe that this restriction needs to be there, and I'm hoping that someone can suggest...
0
1282
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 and the supervisor is listening to their conversation (and grading them as per a specific template) What I've done so far: Created Tables for the entry of:
0
8928
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8766
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9291
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9158
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8160
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6026
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3244
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2171
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.