auto select the rest data from the 1st table

AlaaB

Registered User.
Local time
Today, 01:25
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
 
Have you tried DLOOKUP function? Just search on DLOOKUP.
 
DLookUp is not the best way to go. This would be the equivalent of using four separate queries.

Join the tables in the recordsource query of the form. Use the OnUpdate Event of the combo to copy the values from the fields in table1 to the controls bound to table 2.

I am assuming you need to edit these values copied to table 2. Otherwise normally the information woul only be held in table 1 and the the join performed in any form or report that required the information.

You would need to test the destination fields/controls for null otherwise the values from table 1 would overwrite your new values every time a record was accessed.
 

Users who are viewing this thread

Back
Top Bottom