simple synchronising listbox question (1 Viewer)

Robert Burns

Registered User.
Local time
Today, 04:11
Joined
Jul 1, 2002
Messages
14
On my contracts form, derived from tblContracts, I have a list box that looks up shippingref numbers from tblShipping. The relationship is one contract to many ref numbers. For each contract, the listbox currently shows all ref numbers, not just the ones related to the Contract. How can I synchronise the listbox to the contract? I realise that this is quite a straightforward problem but it's got me stumped!

Any help much appreciated,

Robert.
 

Fizzio

Chief Torturer
Local time
Today, 04:11
Joined
Feb 21, 2002
Messages
1,885
In the query that feeds the listbox (the Rowsource in properties), set the criteria for the contractID field (or whatever field you are synchronising) to the control on the form that holds that contract field
eg
=Forms!NameofForm!NameofContractControl.
It will then only pull out records with the contractID (or whatever) that is currently displayed on the form).

HTH
 

Robert Burns

Registered User.
Local time
Today, 04:11
Joined
Jul 1, 2002
Messages
14
Thank you Fizzio, just what I needed and as simple as I feared!

Cheers.
 

Users who are viewing this thread

Top Bottom