Value from different table

mithani

Registered User.
Local time
Today, 13:55
Joined
May 11, 2007
Messages
291
Hello friends!

I am new Access user. I have made one form for daily transaction. I am using two tables. One is for saving daily transcation "transactionTbl" and other one calling supplier "SupplierTbl" detail. I want whenever I choose any particular supplier, address and contact person detail should take from supplierTbl table and display on my trasaction form.

Can you help me please?

mithani
 
Access – Enter Data on Form Using Combo/List Box

With the form in design view, right click the combo/list box and select
Build Event, then Code Builder.

Select BeforeUpdate from the top right corner.

Enter the following code between the 2 existing lines.

Private Sub Combo55_BeforeUpdate(Cancel As Integer)

[fieldname] = ([Combo55],#)

End Sub

The [fieldname] is the name of the field you want to copy the data to.
Combo55 is the number of the combo box you're using.
The # refers to the column in the combo box. The columns start with number 0 (zero) in the left most column and increases by 1 for each column you move to the right. The third column from the left would therefore be column 2.

Each column you wish to copy when you select a record in the combo box needs its own line of code.

When you created the combo box using the wizard, you had the option of saving one of the columns into a field at that time. If you did this, you don't have to use the code to save that column, it’s already done.
 
Dear Statsman,

This code is showing compile error expected [metal] = ([Combo12],1)

help me please

mithani
 

Users who are viewing this thread

Back
Top Bottom