Open Form Multiple Criteria

P

Peter

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!
 
M

Mark Andrews

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
 
P

Peter

Thanks Mark, i will try my best!


Mark Andrews said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top