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

Single Textbox in a form updating multiple table entries

I am a novice to MS Access. I have about 10 to 15 tables that link to a single form. I use unique ID's to link all of these tables together. Since the ID for the customer never changes, I was hoping that someone could give me a hand and let me know if it is possible to add/update multiple table fields with a single textbox in a form.

Thanks,
JReneau35
Oct 26 '06 #1
8 8129
MMcCarthy
14,534 Expert Mod 8TB

I was hoping that someone could give me a hand and let me know if it is possible to add/update multiple table fields with a single textbox in a form.
I need more information on exactly what you are trying to do.
Oct 27 '06 #2
I need more information on exactly what you are trying to do.
I have a access form that has textboxes and other data controls that link to about 10 to 15 different tables. the tables all connect by using the same INVOICE# key. Since I need the invoice# key to be in all of the tables I was hoping that there was a way to have a single textbox control in the form take the invoice# and plug it into more than one table.
Oct 31 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
I have a access form that has textboxes and other data controls that link to about 10 to 15 different tables. the tables all connect by using the same INVOICE# key. Since I need the invoice# key to be in all of the tables I was hoping that there was a way to have a single textbox control in the form take the invoice# and plug it into more than one table.
It sounds like you have multiple tables of Invoices all using the Invoice# as the primary key.

This doesn't make sense. I understand there are 10 to 15 tables, which seems like an awful lot. Can you post the table structure for 3 or 4 of them so I can see what you're doing.
Oct 31 '06 #4
Unfortunately I cannot post the tables because they contain important client information which I cannot divulge.

Basically the primary key is linking all of these tables up in queries. I am working with a form to plug in client information into different tables. The primary key is the same for all of the tables and a single textbox in my form is where you enter the primary key. Just hoping that instead of having to enter the primary key in the form in different textboxes about 10-15 times (to enter them into each table) I was hoping that one textbox could link to 10-15 tables. I don't know if I can make it much more clear I can be.

Sorry that I cannot give you an example of the project that I am working on, but I am not allowed.

Thank You,
Justin Reneau
Nov 9 '06 #5
NeoPa
32,556 Expert Mod 16PB
Justin,

In a case like this (and it's not a bad idea generally too), you should set up a situation - as small as possible - which reflects your problem using only test data.
This can then be posted without any problems, and has the further benefit that the problem is more concisely contained as you will only create the smallest amount necessary.
A lot of the difficulty involved in posting answers is going through and sorting the relevant info from the dross anyway.
Nov 9 '06 #6
MMcCarthy
14,534 Expert Mod 8TB
Justin,

Your table structure is incorrect and going to cause you numerous problems. If each of these tables has a primary key whose value is the same in each client related record of each table then this is not a unique identifier. It is the the same as having one table of records with 10 - 15 copies of a primary key.

I assume there are different Invoice Numbers to all these records and I would recomment using that as the primary key of a new table to which all records would be appended. These records would then be related to the client in a standard database design using the ClientID (PK) as a foreign key. See sample structure below.

tblInvoice
InvoiceNo (PK of this table)
InvoiceDetails
Amount
VAT
TotalAmount
ClientID (PK of tblClients and Foreign Key in this table)

If you could explain the reasons for the 10 to 15 tables we might be able to help you come up with a different solution.

BTW when I asked for table structure I was only looking for something like the above. I didn't need to see the actual data.

Mary

Unfortunately I cannot post the tables because they contain important client information which I cannot divulge.

Basically the primary key is linking all of these tables up in queries. I am working with a form to plug in client information into different tables. The primary key is the same for all of the tables and a single textbox in my form is where you enter the primary key. Just hoping that instead of having to enter the primary key in the form in different textboxes about 10-15 times (to enter them into each table) I was hoping that one textbox could link to 10-15 tables. I don't know if I can make it much more clear I can be.

Sorry that I cannot give you an example of the project that I am working on, but I am not allowed.

Thank You,
Justin Reneau
Nov 10 '06 #7
Here is my table structure for each table:

tblDometicAddress
InvoiceNumber (pk)
MailCode
AddressLine1
AddressLine2
City
State
Zip
Country

tblDomesticContract
InvoiceNumber (pk)
OriginalContractDate
OriginalContractAmt
ContractAmt
ContractDate
AmendmentDate
Terms
Conditions
Increases

tblDomesticCustomer
InvoiceNumber (pk)
MasterClientNumber (fk)
CustomerName
Fka

tblDomesticInvoice
InvoiceNumber (pk)
Product
Tax
Notes
InvoiceDesc

Here is a couple of tables. Again just seeing if I can have all this information in one form and one textbox to enter the InvoiceNumber in all tables, and different controls for each of the other fields.

Thanks


Justin,

Your table structure is incorrect and going to cause you numerous problems. If each of these tables has a primary key whose value is the same in each client related record of each table then this is not a unique identifier. It is the the same as having one table of records with 10 - 15 copies of a primary key.

I assume there are different Invoice Numbers to all these records and I would recomment using that as the primary key of a new table to which all records would be appended. These records would then be related to the client in a standard database design using the ClientID (PK) as a foreign key. See sample structure below.

tblInvoice
InvoiceNo (PK of this table)
InvoiceDetails
Amount
VAT
TotalAmount
ClientID (PK of tblClients and Foreign Key in this table)

If you could explain the reasons for the 10 to 15 tables we might be able to help you come up with a different solution.

BTW when I asked for table structure I was only looking for something like the above. I didn't need to see the actual data.

Mary
Nov 10 '06 #8
MMcCarthy
14,534 Expert Mod 8TB
tblDometicAddress
DomAddressID (new PK) use autonumber - needs to be created
InvoiceNumber (needs to be removed as address is tied to customer not to invoices. You can use new PK of tblDomesticCustomer as a foreign key instead)
MailCode
AddressLine1
AddressLine2
City
State
Zip
Country

tblDomesticContract
DomContractID (new PK)use autonumber - needs to be created
InvoiceNumber (needs to be removed as contract has many invoices.
You can use new PK of tblDomesticCustomer as a foreign key instead)
OriginalContractDate
OriginalContractAmt
ContractAmt
ContractDate
AmendmentDate
Terms
Conditions
Increases

tblDomesticCustomer
DomContractID (new PK)use autonumber - needs to be created
InvoiceNumber (needs to be removed as contract has many invoices. You need to use the PK from here as the foreign key in all other tables.)
MasterClientNumber (fk)
CustomerName
Fka

tblDomesticInvoice
InvoiceNumber (pk)
DomContractID (FK to tblDomesticCustomer as a customer can have many invoices)
Product
Tax
Notes
InvoiceDesc

Your table structure using InvoiceNo as the PK for all tables would never have worked as tables can only have a 1 to 1 or 1 to many relationship. Almost all of yours have a many to many relationship.

If you follow the restructuring I've outlined above the relationships will allow you to create a main form based on tblDomesticInvoice and any other table it has a 1 to 1 relationship with by joining them together in a query using PK to FK. In cases where there is a 1 to many relationship you can create subforms for the tables containing many records per customer like Invoices and joining the subform to the main form using the DomCustomerID.

You cannot continue to operate under the current design as you cannot create relationships between your tables.

Try restructuring using the above model and come back with any questions.
Nov 10 '06 #9

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

Similar topics

7
by: Paige | last post by:
I have a database on my local machine that I make entries and corrections on. I'd like to be able to upload that to my server and have that update the database that's on the server. What I've been...
5
by: Ross A. Finlayson | last post by:
Hi, I'm scratching together an Access database. The development box is Office 95, the deployment box Office 2003. So anyways I am griping about forms and global variables. Say for example...
1
by: Ken | last post by:
Help! I have a MS Access database made up of a single table. The data updates for this database comes in the form of a single Excel spreadsheet, which is imported into the database table. I...
2
by: .Net Newbie | last post by:
Hello, I am currently coding my ASP.Net pages in c# and have run into a question concerning Emails. I have four objects on a page (six including 2 buttons). The first is a subject line...
4
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has...
7
by: Birky | last post by:
Is there a way to have Access enter multiple entries to a database based on a form where the user has selected a certain criteria? I am hoping to have my form enter multiple entries within a table...
5
by: mtrcct | last post by:
Hi, I have been working on a purchase order form and am trying to add something to it. I currently have a form frmPurchaseOrder and it has 3 tabs in it called header, detail select and detail update....
7
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...
0
by: Mike | last post by:
So here's the situation (.NET 2.0 btw): I have a form, and on this form is a textbox among many other databound controls. The textbox is bound to a field in a data table via the Text property. ...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.