473,403 Members | 2,222 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,403 software developers and data experts.

What is the best method for transferring the value of a variable between two tables?

First, I fully expect that my question will be re-written to make more sense. I suppose I'm such a novice that just understanding what to ask can be difficult.

I'm look for some advice as to where to begin to solve my problem.

I have 3 different tables (Projects, Contacts, and Followup), there are times when I am looking a a record for a particular project or a specific contact that I want to create a FollowUp action (ie call, meeting, or Todo). I simply have created a button that opens a Followup form where I can put in the date/name/phone/action etc. simple enough. My problem is I don't want to have to recreate the wheel each time and retype the contacts name into the FollowUp form or their email or phone. In the case of the Project, the project # that I wish to follow up. I've been reading some posts on Global Variables which sounds like the correct idea to use but most of the advice is to NOT use Global Variables.

Can anyone just point me in the right direction as to where to begin to understand the correct programming theory here? I'm not sure where to begin. I've tried assigning a local type Dim variable which works until I open the FollowUp form then the variable is no longer valid.
Feb 16 '12 #1

✓ answered by Rabbit

Why would you need to retype all the contact information in the followup form? All that information should stay in the contact table. All that's needed on the followup table is a contact ID of some sort. As far as the project goes, you can put the followup form as a subform in the project form and that will autofill the project number.

4 1216
Rabbit
12,516 Expert Mod 8TB
Why would you need to retype all the contact information in the followup form? All that information should stay in the contact table. All that's needed on the followup table is a contact ID of some sort. As far as the project goes, you can put the followup form as a subform in the project form and that will autofill the project number.
Feb 16 '12 #2
Thanks. I was doing something like that before but kept getting caught up in my own underwear (so to speak). I can link the 2 tables (contacts and followup) by the field 'contact'. That would solve that problem. I'm just not sure if I should use 1 to many or many to many link. I'll mess around with the file later tonight. Thanks for the input.
Feb 16 '12 #3
MMcCarthy
14,534 Expert Mod 8TB
You can't use a many to many link. If you have a many to many relationship then add a join table. A join table would normally contain the unique IDs of both tables and each table would have a one to many link with the join table. This may help you with issues you were having previously.

If you need further help on this then add a new question outlining your current table structure and relationships and let us know what relationships you are trying to establish.
Feb 17 '12 #4
Thanks. I didn't do a many to many because it just didn't work correctly. What I did do was create a subform on the forma and used a master/child fields connection which seemed to work for my purposes. I sometimes don't know I'm doing something wrong until I find a new need down the road. Thanks for the input.
Feb 17 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: James | last post by:
What is the best method for creating a Web Page that uses both PHP and HTML ? <HTML> BLA BLA BLA BLA BLA
2
by: Jeff Uchtman | last post by:
What's the best method to hide, or not show a certain record when doing a pull from a database, as in I am pulling a list with a dozen category's and I don't what to show one of them. Thanks...
2
by: Ben | last post by:
Right now I have 1 table. The first part is the first and last name along with address etc. There is about 10-15 fields here. The second part consists of times, penalties and if they enter this...
2
by: John Smith | last post by:
Hey folks, I'm writing a Windows application which has many forms which have Datagrids on them to display data. These datagrids will not be editable in anyway. They are there to just view the...
18
by: blueapricot416 | last post by:
I am on a team designing the front end of an Intranet application. The backend guys will be using JSP and AJAX-like functionality to make server requests that must dynamically change elements on a...
2
by: Fred Flintstone | last post by:
What's the difference between these two methods? 1 - Parameterrized SQL queries: Dim CommandObject As New Data.SqlClient.SqlCommand With CommandObject .Connection = myConnection...
0
by: masmith | last post by:
What is the best method to get data from the database once and use it on several pages of a web site? In ASP.NET 1.1 I would populate a Dataset in the Global.asax and save it to a Session or...
1
by: Max2006 | last post by:
Hi, I am truing to find a pattern for my Business Logic Layer to be able to work fine win ObjectDataSource's Update method. The challenge is ObjectDataSource is not able to work with an...
2
by: Steven Cheng [MSFT] | last post by:
Hi Cj, I also noticed that the "Act" variable here seems hasn't been declared(or declared anywhere else?). I've try building the same code and got the same result and the "Operator '+' cannot be...
5
by: Eric Fortin | last post by:
I have a disconnected handheld device that I want to send the results of the day to a database through a web service (on an intranet) What's the best method to do this? XML? Tab...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
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
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...
0
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,...
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...

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.