PC Review


Reply
Thread Tools Rate Thread

How to use the requery in the form

 
 
=?Utf-8?B?QWxhblc=?=
Guest
Posts: n/a
 
      4th Jan 2006
I have a list which contains several suppliers and each of which has its own
products. How can I narrow the product selections after choosing particular
supplier. Is it right to use requery function?
 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      4th Jan 2006
You need to programmatically set the RowSource of the Product combo, in the
AfterUpdate event of the Supplier combo.

Details:
Limit content of combo/list boxes
at:
http://www.mvps.org/access/forms/frm0028.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"AlanW" <(E-Mail Removed)> wrote in message
news:01894361-A68F-4156-802C-(E-Mail Removed)...
>I have a list which contains several suppliers and each of which has its
>own
> products. How can I narrow the product selections after choosing
> particular
> supplier. Is it right to use requery function?



 
Reply With Quote
 
 
 
 
Marshall Barton
Guest
Posts: n/a
 
      4th Jan 2006
AlanW wrote:

>I have a list which contains several suppliers and each of which has its own
>products. How can I narrow the product selections after choosing particular
>supplier. Is it right to use requery function?



Assuming the products combo box's RowSource query uses the
supplier combo box in its criteria, then, yes you would use
Requery with this kind of code in the supplier combo box's
AfterUpdate event procedure:

Me.cboProducts = Null
Me.cboProducts.Requery

You will probably want to use the requery line in the form's
Current event too.

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Requery issue : Application closes on form.requery.... =?Utf-8?B?c3VyeWE=?= Microsoft Access Form Coding 3 6th Nov 2006 09:58 PM
Requery the 1st requery result which displayed in form vincentt via AccessMonster.com Microsoft Access 2 31st Aug 2006 03:49 AM
requery subform in form after exit a form =?Utf-8?B?Um95?= Microsoft Access Forms 0 28th Feb 2005 11:19 AM
Access ADP Crashing on Form.Requery and Form.Refresh Louis Levine Microsoft Access 4 19th Nov 2004 06:00 PM
Requery without using Me.Requery? Daniel Microsoft Access VBA Modules 3 28th Oct 2003 01:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:52 PM.