i need help pleaseeeee it's so urgent

AlaaB

Registered User.
Local time
Yesterday, 19:23
Joined
Jul 27, 2010
Messages
15
Hi guys
i have a little Q

i have created table number 1
contain
Account number, Description, Status and Code


and i have created table number 2
contain the same mention fields above + lots of fields such as date and price and paid not paid etc

and the Q is how can i make the table number 2 take the data from table number one as soon as i select the account number or account name from the combo box that i create on the form

i need the table no 2 to take only the (Account number, Description, Status and Code) from the table number 1

sure the table 1 has data and its read only i don't want to edit it

waiting your kind support

thanks in advanced
 
Alaa,

The concept in Access would be that a properly designed database would not have these same fields Account number, Description, Status and Code in more than one table. This is a recipe for some serious headaches. You hafven't really given us enough information, and "table number 1" and "table number 2" give us no clues, so it is not possible at this stage to advise more explicitly. But you need to revise the design of your tables.
 
sorry for that,
ok i'll explain more
i mad a table (COA Active) which contain the bank account description, status and numbers
and i fill it with all the bank accounts.

and for the 2nd table i named it (COA entry) and this table made to register the expense into it, so we need to match each expense to its account, and i dont to write the account number and descpription and status each time i register an expence such as salary or fuel or canteen etc...

hope its clear now

sure i want the second table (COA entry) to be on the form,
i think that i need to match it into sub form but the problem is i don't know how to do it
 
Alaa,

No, the COA Entry table does not need all that information repeated in it. All it needs is the field (Account Number?) that identifies each COA Active record. If you know that value, then you automatically know the value of all the related fields, as that can be retrieved from the COA Active table. That's a key concept of a relational database.

However, there is of course often the desire to display the value of the "one-side" related data on a form or report. But that doesn't mean the data should be repeated. On that question, you may find this article useful:
http://accesstips.datamanagementsolu...biz/lookup.htm
 
Hi,

You should read up on normalizing tables, it will avoid making duplicate entries in two or more tables.

I learnt this the hard way! :rolleyes:


sorry for that,
ok i'll explain more
i mad a table (COA Active) which contain the bank account description, status and numbers
and i fill it with all the bank accounts.

and for the 2nd table i named it (COA entry) and this table made to register the expense into it, so we need to match each expense to its account, and i dont to write the account number and descpription and status each time i register an expence such as salary or fuel or canteen etc...

hope its clear now

sure i want the second table (COA entry) to be on the form,
i think that i need to match it into sub form but the problem is i don't know how to do it
 
Please confirm my understanding of your problem. You have 2 tables:-
  1. COA Active stores bank account number, description and status
  2. COA Entry stores bank account number (foreign key) and expense details
You wish to place a sub form on your main form (which is based on the COA Active table, or a query using this table as its source), that lists all expenses for the current record, linked by bank account number?
 

Users who are viewing this thread

Back
Top Bottom