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

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

P: 24
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.

Share this Question
Share on Google+
4 Replies


Rabbit
Expert Mod 10K+
P: 12,366
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

P: 24
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
Expert Mod 10K+
P: 14,534
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

P: 24
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

Post your reply

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