Double Criteria for Open Form

notrino

Registered User.
Local time
Today, 21:35
Joined
Oct 18, 2018
Messages
26
Hello,

I attached my application,

S1 form showing S1 query values. This form is including double ID (ID1 and ID3) When I push the button, F1 must be open. Same ID1 for F1 is including several ID3 values in the subform. So, I want to ID1 and ID3 criteria at the same time for the main form and subform values. In this way, I can see true records at the same time on the main form. How can I create double criteria? Thanks.
 

Attachments

Hello Gizmo,

But you misunderstood me. Your solution is including "classic 1 criteria". I want to "2 criteria". F1 form must be open ID1 and ID3 criteria together. Not for only ID1
 
Last edited:
I think the OP is saying the subform is not related to the main form

e.g. mainform recordsource - tblRailwayStations, subform recordsource - tblFruit


@notrino - look at using the openargs parameter to pass the id for subform as a value, then some code in the main form current event to apply the id value to filter the subform
 
Hello Gizmo,

Yes your last solution is working. But it's a pretty complicated solution. I scared :) Thank you again, see you.
 
Hello Gizmo,

Thank you. I created myself solution for this application. If I write this codes for
"buton click event" the program running like yours.

Code:
DoCmd.OpenForm "F1", acNormal, , "[ID1]=" & Me.ID1
DoCmd.GoToControl "alt1"
DoCmd.FindRecord Me.ID3
 
. I need willing "guinea pigs" to practice on!


Sent from my SM-G925F using Tapatalk

Of course I'm volunteering. I don't know VBA very well. I am aware that the situation is different, especially in Access applications.
 

Users who are viewing this thread

Back
Top Bottom