combo box

snowman

Registered User.
Local time
Today, 22:27
Joined
Mar 3, 2006
Messages
24
i really need some help with this... heres the background. I have an unbound search combo box in the header of my form. when users select the PCNo from this combo box, i need the associated container no to appear in a control on a bound form.. below are my tables:

tblShipping
ShipID (PK)
PCNo

tblContainer
ContainerID(PK)
ShipID (FK)
ContainerNo - (data to be displayed on form)

how can i pull up and display the container no (stored in tblContainer) based on the PC No that a user selects from this combo box?

i have got the combobox working fine - the users can select a PC No that is already stored. what i need now is for the Container No to be displayed on this form, based on the PC No.
 
Write a new query that joins tblShipping with tblContainer and select
ShipID (PK)
PCNo

ContainerNo - (data to be displayed on form)

where tblShipping.shipID = tblContainer.shipID

in the criteria section of the PCNo type forms![yourform]![comboboxname]

In the afterupdate event of the combo box

containerfield on form = nz(dlookup("containerfieldinquery","queryname"),"")

hopefully roberts your mothers brother
 

Users who are viewing this thread

Back
Top Bottom