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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|