473,609 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Single form to control two similar tables.

Hello All,

I am trying to link to an existing database and extend the
funcitonality by adding a phone call logging extension, so you can see
a list of phone calls for a given customer.

There are two similar address tables (USA and international), which are
almost the same except for some shipping addresses. The fields I'm
interested in are all the same. So, I have:

TABLES:
tblAddress (linked)
tblAddressInter national (linked)
tblPhoneCalls (new)

FORMS:
FormAddress - based on tblAddress - shows customer specifics
FormPhoneCalls - based on tblPhoneCalls - shows details of a call.
FormCallsByCust omer (main uses tblAddress, Subform uses
tblPhonecalls)

Currently, the tblPhoneCalls stores a foreign key to identify the
customer in the tblAddress. I can pretty much do everything I want with
US users, but can't see the international users.

SOOO - What I am wondering, is, is there any way that I can generate a
query that will combine the two similar address tables into a single
table, and base my FormCallsByCust omer on that.

It seems to me that I can create such a table, but I have trouble
conceiving of what foreign key is inserted in the tblPhoneCalls to keep
track of it, and whether I will have problems due to the tblAddress and
tblAddressInter national having new records added at different times.

Thanks in advance.
Steves
stevesATeyeDASH imagingDOTcom

Jan 17 '07 #1
4 1365
On 16 Jan 2007 20:08:00 -0800, "steves" <st************ @sbcglobal.net>
wrote:

That's what UNION queries are for:
Select <5 fieldsfrom Table1
UNION
Select <5 fieldsfrom Table2

-Tom.

>Hello All,

I am trying to link to an existing database and extend the
funcitonalit y by adding a phone call logging extension, so you can see
a list of phone calls for a given customer.

There are two similar address tables (USA and international), which are
almost the same except for some shipping addresses. The fields I'm
interested in are all the same. So, I have:

TABLES:
tblAddress (linked)
tblAddressInter national (linked)
tblPhoneCalls (new)

FORMS:
FormAddress - based on tblAddress - shows customer specifics
FormPhoneCalls - based on tblPhoneCalls - shows details of a call.
FormCallsByCust omer (main uses tblAddress, Subform uses
tblPhonecall s)

Currently, the tblPhoneCalls stores a foreign key to identify the
customer in the tblAddress. I can pretty much do everything I want with
US users, but can't see the international users.

SOOO - What I am wondering, is, is there any way that I can generate a
query that will combine the two similar address tables into a single
table, and base my FormCallsByCust omer on that.

It seems to me that I can create such a table, but I have trouble
conceiving of what foreign key is inserted in the tblPhoneCalls to keep
track of it, and whether I will have problems due to the tblAddress and
tblAddressInte rnational having new records added at different times.

Thanks in advance.
Steves
stevesATeyeDAS HimagingDOTcom
Jan 17 '07 #2
So,

If I perform a UNION query on my two tables, does the resulting dataset
have an "AutoID" field that I can use as a foreign key in my "Phone
Calls" table, which will point me to the correct row?
Tom van Stiphout wrote:
On 16 Jan 2007 20:08:00 -0800, "steves" <st************ @sbcglobal.net>
wrote:

That's what UNION queries are for:
Select <5 fieldsfrom Table1
UNION
Select <5 fieldsfrom Table2

-Tom.

Hello All,

I am trying to link to an existing database and extend the
funcitonality by adding a phone call logging extension, so you can see
a list of phone calls for a given customer.

There are two similar address tables (USA and international), which are
almost the same except for some shipping addresses. The fields I'm
interested in are all the same. So, I have:

TABLES:
tblAddress (linked)
tblAddressInter national (linked)
tblPhoneCalls (new)

FORMS:
FormAddress - based on tblAddress - shows customer specifics
FormPhoneCalls - based on tblPhoneCalls - shows details of a call.
FormCallsByCust omer (main uses tblAddress, Subform uses
tblPhonecalls)

Currently, the tblPhoneCalls stores a foreign key to identify the
customer in the tblAddress. I can pretty much do everything I want with
US users, but can't see the international users.

SOOO - What I am wondering, is, is there any way that I can generate a
query that will combine the two similar address tables into a single
table, and base my FormCallsByCust omer on that.

It seems to me that I can create such a table, but I have trouble
conceiving of what foreign key is inserted in the tblPhoneCalls to keep
track of it, and whether I will have problems due to the tblAddress and
tblAddressInter national having new records added at different times.

Thanks in advance.
Steves
stevesATeyeDASH imagingDOTcom
Jan 19 '07 #3
On 19 Jan 2007 09:59:28 -0800, "steves" <st************ @sbcglobal.net>
wrote:

You could enhance this query with:
Select <5 fields>, "Table1" As FromTable from Table1
UNION
Select <5 fields>, "Table2" As FromTable from Table2

Now the FromTable column will tell you where each row came from.

-Tom.
>So,

If I perform a UNION query on my two tables, does the resulting dataset
have an "AutoID" field that I can use as a foreign key in my "Phone
Calls" table, which will point me to the correct row?
Tom van Stiphout wrote:
>On 16 Jan 2007 20:08:00 -0800, "steves" <st************ @sbcglobal.net>
wrote:

That's what UNION queries are for:
Select <5 fieldsfrom Table1
UNION
Select <5 fieldsfrom Table2

-Tom.

>Hello All,

I am trying to link to an existing database and extend the
funcitonalit y by adding a phone call logging extension, so you can see
a list of phone calls for a given customer.

There are two similar address tables (USA and international), which are
almost the same except for some shipping addresses. The fields I'm
interested in are all the same. So, I have:

TABLES:
tblAddress (linked)
tblAddressInter national (linked)
tblPhoneCalls (new)

FORMS:
FormAddress - based on tblAddress - shows customer specifics
FormPhoneCalls - based on tblPhoneCalls - shows details of a call.
FormCallsByCust omer (main uses tblAddress, Subform uses
tblPhonecall s)

Currently, the tblPhoneCalls stores a foreign key to identify the
customer in the tblAddress. I can pretty much do everything I want with
US users, but can't see the international users.

SOOO - What I am wondering, is, is there any way that I can generate a
query that will combine the two similar address tables into a single
table, and base my FormCallsByCust omer on that.

It seems to me that I can create such a table, but I have trouble
conceiving of what foreign key is inserted in the tblPhoneCalls to keep
track of it, and whether I will have problems due to the tblAddress and
tblAddressInte rnational having new records added at different times.

Thanks in advance.
Steves
stevesATeyeDAS HimagingDOTcom
Jan 20 '07 #4
Thanks Tom that worked!

Steves
StevesATeyeDASH imagingDOTcom

Tom van Stiphout wrote:
On 19 Jan 2007 09:59:28 -0800, "steves" <st************ @sbcglobal.net>
wrote:

You could enhance this query with:
Select <5 fields>, "Table1" As FromTable from Table1
UNION
Select <5 fields>, "Table2" As FromTable from Table2

Now the FromTable column will tell you where each row came from.

-Tom.
So,

If I perform a UNION query on my two tables, does the resulting dataset
have an "AutoID" field that I can use as a foreign key in my "Phone
Calls" table, which will point me to the correct row?
Tom van Stiphout wrote:
On 16 Jan 2007 20:08:00 -0800, "steves" <st************ @sbcglobal.net>
wrote:

That's what UNION queries are for:
Select <5 fieldsfrom Table1
UNION
Select <5 fieldsfrom Table2

-Tom.
Hello All,

I am trying to link to an existing database and extend the
funcitonality by adding a phone call logging extension, so you can see
a list of phone calls for a given customer.

There are two similar address tables (USA and international), which are
almost the same except for some shipping addresses. The fields I'm
interested in are all the same. So, I have:

TABLES:
tblAddress (linked)
tblAddressInter national (linked)
tblPhoneCalls (new)

FORMS:
FormAddress - based on tblAddress - shows customer specifics
FormPhoneCalls - based on tblPhoneCalls - shows details of a call.
FormCallsByCust omer (main uses tblAddress, Subform uses
tblPhonecalls)

Currently, the tblPhoneCalls stores a foreign key to identify the
customer in the tblAddress. I can pretty much do everything I want with
US users, but can't see the international users.

SOOO - What I am wondering, is, is there any way that I can generate a
query that will combine the two similar address tables into a single
table, and base my FormCallsByCust omer on that.

It seems to me that I can create such a table, but I have trouble
conceiving of what foreign key is inserted in the tblPhoneCalls to keep
track of it, and whether I will have problems due to the tblAddress and
tblAddressInter national having new records added at different times.

Thanks in advance.
Steves
stevesATeyeDASH imagingDOTcom
Jan 23 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1780
by: Arnold | last post by:
Hi there, I have a form to organize bottles in mind, but am unsure if it will work. Here's some background info: Mainform = frmProduct, which contains fields for pricing, status, etc. of complete bottles, as well as an image control for a thumbnail of a complete product (bottle + cap). The mainform has 2 subforms that must be visible and side-by-side:
3
1722
by: Bill | last post by:
I have a seating chart web form that has over 50 entry field controls (tables/booths) where I use a DropDownList box to select a single company name from a single large list of organizations (200 plus conference attendees). All web form datavalues will be one of the same 200 organizations in this list. I would like to avoid creating 50 separate exact copies of the same DataSet object. Can you help? Q. Exactly how do I use the same...
18
3336
by: Alpha | last post by:
Hi, I'm working on a Windows applicaton with VS 2003 on windows 2000. I have a listbox that I have binded to a dataset table, "source" which has 3 columns. I would like to display 2 of those columns, "scode" and "sname", as 1 column (if not possible then 2 columns will be fine) in the listbox. Can the listbox display 2 columns information from the dataset and how can I do that? Also, I set the property of the listbox to selectionmode...
5
1585
by: Earl | last post by:
I want to fire a database update off of a single change to a single cell in the datagrid. This apparently cannot be done using keypress, keyup, keydown, etc. I've read George Shepard's FAQ and while I may have overlooked it, I have not found an answer. I now am using the CurrentCellChanged event, and this is satisfactory IF the user moves off of the cell before closing the form. An obvious alternative would be to check for changes before...
20
6587
by: Keith G. Murphy | last post by:
I'm trying to get a feel for what most people are doing or consider best practice. Given a mod_perl application talking to a PostgreSQL database on the same host, where different users are logging onto the web server using LDAP for authentication, do most people 1) have the web server connecting to the database using its own user account (possibly through ident), and controlling access to different database entities strictly through...
7
2718
by: Daz | last post by:
Hi. I am trying to select data from two separate MySQL tables, where I cannot use join, but when I put the two select queries into a single query, I get an error telling me to check my syntax. Both of the queries work fine when I use them to query the MySQL server directly. My guess is that the MySQL extension only expects a single resource back from the database, but get's several, or that it just checks the statement first, and decides...
7
15644
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is there an equivalent property for the DataGridView? I have searched, but have not found one. I would like the user to be able to see all the columns of the table on one screen - thus eliminating the need to use the horizontal scroll bar to view...
1
4148
by: jcf378 | last post by:
Hi all-- Does anyone have any insight as to how I might create a search form that allows a user to select criteria based on any related table in the whole database. The search form I have now only allows me to filter based on variables in a single table. I would like to have a search form where I can select multiple variables (from various linked tables) to filter by, and return results based on this multi-table filter. Allen Browne...
2
2315
by: adwest | last post by:
Forgive me if this is a foolish question. I "play" in Access and have only created a few rather simple relational databases. My knowledge and experience is limited. I have no formal training, just picked up a few books and have gone from there... I'm not sure how to relate my question using the accepted shorthand, so I'm afraid this will be a narrative description. I am using Access 2003. The database is for property management. I have...
0
8145
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
8588
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8556
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...
1
8236
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6068
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
4037
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1690
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1407
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.