A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

where clause in recordsource



 
 
Thread Tools Display Modes
  #1  
Old August 19th, 2004, 09:15 PM
Carlee
external usenet poster
 
Posts: n/a
Default where clause in recordsource

Hello there

I have a form that has a revolving recordsource depending what is selected
in the first screen. For example if Canada is clicked in the list box, the
recordsource for the next screen is only those clients in canada. How can i
use the same query to have no where clause. I have an All selection in my
list box, but can't seem to get the query to show all records

Any suggestions?
--
Carlee
  #2  
Old August 19th, 2004, 09:52 PM
Albert D. Kallal
external usenet poster
 
Posts: n/a
Default

Just make sure the 2nd form query has NO parameters or prompts...

Then, simply use the "where" clause option when you open the form.

dim strWhere as string

strWhere = "Country = '" & me.lstCountry & "'"

docmd.OpenForm "my second form",,,strWhere


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada

http://www.attcanada.net/~kallal.msn


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Refering to a cell in Where Clause of External Data Range Namzaj Worksheet Functions 1 August 15th, 2004 09:38 PM
Subreport recordsource problem ctdak Setting Up & Running Reports 2 July 19th, 2004 07:53 AM
Defining recordsource for report including "all" Melanie O Setting Up & Running Reports 2 July 12th, 2004 05:15 PM
Can recordsource parameters be set in code? Using Forms 1 June 15th, 2004 04:56 AM
Changed recordsource = nodata Atlas Setting Up & Running Reports 1 June 1st, 2004 10:41 PM


All times are GMT +1. The time now is 05:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.