473,796 Members | 2,559 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple Tables & Forms - linked together

99 New Member
Hey,

I have about 5 tables, and each table has a corresponding form. The 1st table (A) is a client data table (client information) with a ClientID (PK). This clientId is a (FK) in all 4 other tables (B-E). Now I have the tables linked in a relationship by PK-FK (1-to-1 relationships). The forms are set to go form A to form E by use of command buttons (click on in form A and opens form B...). The issue is, when I enter data in form A then click on the "continue" button to form B, the clientID is not displayed on form B. Instead a blank form B is opened, where I can enter the data, but it is not linked to form A. I've tried using the "where" condition on the OpenForm. Setting TableA.ClientID = TableB.ClientID ; but this doesn't work either. Instead after entering data in form A and clicking on continue it pops up the MSG: Enter Parameter Value TableB.CLientID . I don't understand why the clientId is not being carried over to tables B-E. Can someone please advise me on this. I simply can't figure it out. Thanks.
Nov 7 '06 #1
4 3484
MMcCarthy
14,534 Recognized Expert Moderator MVP
Hey,

I have about 5 tables, and each table has a corresponding form. The 1st table (A) is a client data table (client information) with a ClientID (PK). This clientId is a (FK) in all 4 other tables (B-E). Now I have the tables linked in a relationship by PK-FK (1-to-1 relationships). The forms are set to go form A to form E by use of command buttons (click on in form A and opens form B...). The issue is, when I enter data in form A then click on the "continue" button to form B, the clientID is not displayed on form B. Instead a blank form B is opened, where I can enter the data, but it is not linked to form A. I've tried using the "where" condition on the OpenForm. Setting TableA.ClientID = TableB.ClientID ; but this doesn't work either. Instead after entering data in form A and clicking on continue it pops up the MSG: Enter Parameter Value TableB.CLientID . I don't understand why the clientId is not being carried over to tables B-E. Can someone please advise me on this. I simply can't figure it out. Thanks.
If form A remains open when you open form B.

In the OnOpen event of form B put

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Form_Open()
  3.  
  4. Me.ClientID = Forms![Name of Form A]![ClientID]
  5.  
  6. End Sub
  7.  
  8.  
Nov 7 '06 #2
robertmeyer1
99 New Member
I have 2 forms, based off separate tables. Form ClientInformati on is entered, then you click a command button (running macro) which opens Form B. I am trying to set the clientautoId the same. This is the autonumber from ClientInformati on and is used to uniquely identify the client in all the tables. (these 2 tables have a 1-to-1 relationship). The goal is to enter the information in ClientInformati on, hit continue to open form B, and it opens to the same record source as form ClientIfnormati on.

Here’s the code I was recommended to use (from form B’s OnOpen):

Private Sub Form_Open(Cance l As Integer)
Me.ClientAutoID = Forms![frmClientInform ation]![ClientAutoID]
End Sub

Error Message that pops up:

Microsoft Visual Basic:
Run-time error ‘-2147352567 (800200009)’:
You can’t assign a value to this object.

It highlights Me.CLientAutoID . When I move my cursor over both ClientAutoId’s it shows the clientautoid number’s for the specific record. (ex: 11aaa1111 is used on both id’s). Any suggestions?
Nov 8 '06 #3
MMcCarthy
14,534 Recognized Expert Moderator MVP
Is ClientAutoID an autonumber in both tables?

It should only be an autonumber and primary key of one table.

It should be a number and foreign key in the other table.

I have 2 forms, based off separate tables. Form ClientInformati on is entered, then you click a command button (running macro) which opens Form B. I am trying to set the clientautoId the same. This is the autonumber from ClientInformati on and is used to uniquely identify the client in all the tables. (these 2 tables have a 1-to-1 relationship). The goal is to enter the information in ClientInformati on, hit continue to open form B, and it opens to the same record source as form ClientIfnormati on.

Here’s the code I was recommended to use (from form B’s OnOpen):

Private Sub Form_Open(Cance l As Integer)
Me.ClientAutoID = Forms![frmClientInform ation]![ClientAutoID]
End Sub

Error Message that pops up:

Microsoft Visual Basic:
Run-time error ‘-2147352567 (800200009)’:
You can’t assign a value to this object.

It highlights Me.CLientAutoID . When I move my cursor over both ClientAutoId’s it shows the clientautoid number’s for the specific record. (ex: 11aaa1111 is used on both id’s). Any suggestions?
Nov 9 '06 #4
robertmeyer1
99 New Member
It's a FK and a number. It think I'm gonna try to start over.
Nov 21 '06 #5

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

Similar topics

6
6786
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used the SQL Profile to watch the T-SQL-Command which Access ( who creates the commands?) creates and noticed:
1
2756
by: E Arredondo | last post by:
Hi, I am about migrate from an old program database to MySql (Running under RH LINUX)and I'm wondering which is the best option to do : I currently have one file for each of my modules, (I'm using filepro plus) , so like CUSTOMER, WARRANTY, ZIPCODES, INV, etc... like 2,000 files each with their own fields. 1) Should I create multiple databases on MySQL
1
2600
by: Dominic Marks | last post by:
Hi, (I apologise if this is the wrong list, I haven't posted to a postgresql.org mailing list before, general seemed like a good catch-all) I am trying to implement a centralised authentication system using PostgreSQL as the central repository for user and password information. I want to keep a table which contains core user details like the username and password and then use this data
5
3307
by: Scott Tilton | last post by:
I am having a terrible time getting this to work. I am hoping someone out there can help me with very specific code examples. I am trying to get the linked tables in my Access 97 database to be updated whenever the database opens. I need to have them updated based on an INI file that resides in the same directory as the current database. I do not need or want the ability to open a dialog box to pick the location. I simply want it to...
2
6613
by: IanCraft | last post by:
I am new to Access 2002 and have a questions regarding using a form for data entry. I have 15 items I need to keep track of that are listed individually on a form as follows: Item#1Name AmountOut AmountIn Item#2Name AmountOut AmountIn etc. Each day, the user opens this form and records the amount they have taken or put in for each of the 15 items. This form, when submitted,
1
1257
by: Joe Farish | last post by:
I have a database with the following one to many mappings: Prototype => Device => Test Conditions => Test Results When I input data manually the database works fine and each set of results is associated with a set of test conditions which is in turn asssociated with a device etc. However, all of the information I have is stored in .txt files and so when I import it using the Get External Data function it isn't linked together. How can...
11
4536
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my database,just help in getting me pointed in the right direction. I have a database with 8 tables, which from what I have read, cannot be linked on a single form, and be updatable. I have created a query which includes all 8 tables, and then...
1
2508
by: bmiller | last post by:
I have a form with 4 tabs that I want to use as a data entry input form. I previously had seperate forms which seem to work ok, but decided it would be better to have all together, thus used a tab control to create 4 tabs. Individually the forms worked ok, but now I get error messages "this control has invalid control source" and don't know how to fix without then causing errors on other tabs. How do I incorporate different tables into...
4
3301
by: knix | last post by:
I have this access project consisting of multiple tables that are linked together in a relationship. I would like to migrate the consolidated information through appending in a datasheet form or importing the gathered information . Can anyone please give solutions with my problem? Can I make a datasheet form (consisting fields from multiple tables that are linked together with relationships) in ms access which I could paste append or insert...
0
9673
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
9525
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
10221
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
10169
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,...
0
9050
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
7546
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
5440
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
5569
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
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

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.