Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

filter from a form and open data in a second form

Status
Not open for further replies.

virginie

Programmer
Jul 24, 2002
53
0
0
IL
please help me i'm sure this is not complicate..)

i have a form that permits me to select the good option to filter the data.
i have a frame with some options
for each frame options at the end i have a query that give me the filter

when i want to enter the form with the filtered data, i click a buton :
****************************
Private Sub Command17_Click()
On Error GoTo Err_Command17_Click

Select Case framFilter
Case 1
'select * from orders,order_details ;
Case 2
'select * from orders,order_details where orders.id_order = "id text from the form";
Case 3
'select * from orders,order_details where orders.supplier = "supplier text from the form";
End Select

Dim stDocName As String
Dim stLinkCriteria As String
'open this form with the data from the framFilter
'''''''''''''''''''''''''''''''''''''''''''''''

stDocName = "see_order"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command17_Click:
Exit Sub

Err_Command17_Click:
MsgBox Err.description
Resume Exit_Command17_Click

End Sub
**************************
i know what are all my queries

the single problem is how to send to the form "see_order " that i want to open, the data relevent after the filter??

please help me
i am really stuck and i'm sure this is not hard thing!!
i can send the code if someone accept to help me...
 
Hi,

Try using the current .filter property to the called form.

newForm.filter = oldForm.filter

Then requery the form.

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top