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  

Open Form Multiple Criteria



 
 
Thread Tools Display Modes
  #1  
Old October 11th, 2009, 09:11 PM posted to microsoft.public.access.forms
Peter
external usenet poster
 
Posts: 962
Default Open Form Multiple Criteria

Hi All…

I want to open a form with multiple criteria

To Open Form: Bag
From Form: Fruits

Field1: Apples
Field 2: Colours (Green) (Yellow) (Red)
Field 3. Type (Granny Smith)
Field 4..Count of Types (number)

I want to click on Field 4 and open a form that displays all records (Granny
Smith) that are (Yellow)…

Thanks for all help!

  #2  
Old October 11th, 2009, 11:05 PM posted to microsoft.public.access.forms
Mark Andrews[_2_]
external usenet poster
 
Posts: 600
Default Open Form Multiple Criteria

Look at "DoCmd.OpenForm"
You can pass in the where clause that is to be used for the form you are
opening.
You would build that as a string from values you extract from these controls

Here's a simple example that just builds a sting off ONE of the controls
(yours would have a bigger where clause)
DoCmd.OpenForm "frmBag", , , "(tblFruit.FruitID = " & Me.ComboFruit & ")",
acFormEdit, acDialog

HTH,
Mark
RPT Software
http://www.rptsoftware.com

"Peter" wrote in message
...
Hi All.

I want to open a form with multiple criteria

To Open Form: Bag
From Form: Fruits

Field1: Apples
Field 2: Colours (Green) (Yellow) (Red)
Field 3. Type (Granny Smith)
Field 4..Count of Types (number)

I want to click on Field 4 and open a form that displays all records
(Granny
Smith) that are (Yellow).

Thanks for all help!



  #3  
Old October 11th, 2009, 11:21 PM posted to microsoft.public.access.forms
Peter
external usenet poster
 
Posts: 962
Default Open Form Multiple Criteria

Thanks Mark, i will try my best!


"Mark Andrews" wrote:

Look at "DoCmd.OpenForm"
You can pass in the where clause that is to be used for the form you are
opening.
You would build that as a string from values you extract from these controls

Here's a simple example that just builds a sting off ONE of the controls
(yours would have a bigger where clause)
DoCmd.OpenForm "frmBag", , , "(tblFruit.FruitID = " & Me.ComboFruit & ")",
acFormEdit, acDialog

HTH,
Mark
RPT Software
http://www.rptsoftware.com

"Peter" wrote in message
...
Hi All.

I want to open a form with multiple criteria

To Open Form: Bag
From Form: Fruits

Field1: Apples
Field 2: Colours (Green) (Yellow) (Red)
Field 3. Type (Granny Smith)
Field 4..Count of Types (number)

I want to click on Field 4 and open a form that displays all records
(Granny
Smith) that are (Yellow).

Thanks for all help!




 




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


All times are GMT +1. The time now is 07:51 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.