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

Multiple Tables & Forms - linked together

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 3470
MMcCarthy
14,534 Expert Mod 8TB
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
I have 2 forms, based off separate tables. Form ClientInformation 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 ClientInformation 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 ClientInformation, hit continue to open form B, and it opens to the same record source as form ClientIfnormation.

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

Private Sub Form_Open(Cancel As Integer)
Me.ClientAutoID = Forms![frmClientInformation]![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 Expert Mod 8TB
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 ClientInformation 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 ClientInformation 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 ClientInformation, hit continue to open form B, and it opens to the same record source as form ClientIfnormation.

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

Private Sub Form_Open(Cancel As Integer)
Me.ClientAutoID = Forms![frmClientInformation]![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
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
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...
1
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...
1
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...
5
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...
2
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 ...
1
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...
11
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...
1
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...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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,...

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.