View Full Version : Subform Requery


wizcow
02-18-2002, 08:50 PM
Hi

My 'Order' form has a subform, 'OrderSub'.

In the 'OrderSub' I have several controls, two of them are combo boxes 'cboPartType' and 'cboPartID'.

'cboPartID' runs off of a query which goes to the subform to see wich 'cboPartType' has been selected, so it can shorten the 'cboPartID' list.

Here's my problem;
'cboPartID' is always empty. Nothing in the list.

If I open the 'Order' form and select a 'cboPartType' in the subform, I can then open the query and view the shortend list of PartID's. So the query IS working.

I have tried using the 'DoCmd.Requery' in VB on the "on Exit" of the 'cboPartType', but to no avail.

Tom

boblarson
02-19-2002, 10:24 AM
What you want to do is to put this code in the cboPartType ON_CHANGE event:

cboPartID.Requery

That should do it for you.

BL
hth

wizcow
02-19-2002, 05:04 PM
BL

Thanks a bunch. That worked great.

Tom