Newbie Help with displaying LOV

  • Thread starter Thread starter manish.amina
  • Start date Start date
M

manish.amina

Hi,
I had worked with oracle forms a long time back, but I am a newbie when
it comes to creating forms in Microsoft Access. I am trying to create a
master-detail form. My detail records have an part_ID field, the
description of which is stored in the parts master. How do I display
the description along with the detail record.

Also if I update the part_id here, how do I ensure that the description
also changes as soon as I enter the new part_id?

I am really going nuts here. Any help would be most appreciated.

Regards
Manish
 
Hi, manish,

In your form, have the part_ID field come into a combo box, not a text box,
and the description in a separate text box. The combo box's Row Source Type
should be 'Table/Query' and the Row Source should be a SQL statement, such as:
="SELECT part_ID, Desc FROM YourTableName INNER JOIN PartsMaster ON
YourTableName.part_ID = PartsMaster.part_ID". Set the column count to 2, the
Bound Column to 1, and the Column Width to 1";0" (you can play with the width
of the first column, the second column is 0).

For your text box, make the Control Source as follows: =Me.ComboBoxName.
Column(2)

I can't test this code 100% right now, but this should put you on the right
track.

Sam
 
Back
Top