Multiple controls in Dropdown (1 Viewer)

Gismo

Registered User.
Local time
Today, 02:01
Joined
Jun 12, 2017
Messages
1,298
Hi all,

I have a drop down which includes 2 controls when selecting, a description and type
descriptions might be duplicated with the different types
when i select description 1 with type 1, i want a form to only display the selection made on both controls
I am not sure how to link the form to select the criteria of the second control in the drop down

I tried: #[Forms]![MaterialNo_Linked_to_Defect]![Sub,1]#
to display the second control in a query
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 07:01
Joined
May 7, 2009
Messages
19,237
you add an Unbound Textbox Control to your Form.
and hide it (Property->Format->Visible=No).

now, add Code to AfterUpdate Event of your Combo:

private sub combo0_afterupdate()
if trim(me.combo0 & "") <> "" then
me!unBoundTextbox = me.combo.Column(1)
else
me!unBoundTextbox = Null
end if
end sub

on your query, you need 2 criteria, your Combo and the UnboundTextbox.
 

Gismo

Registered User.
Local time
Today, 02:01
Joined
Jun 12, 2017
Messages
1,298
you add an Unbound Textbox Control to your Form.
and hide it (Property->Format->Visible=No).

now, add Code to AfterUpdate Event of your Combo:

private sub combo0_afterupdate()
if trim(me.combo0 & "") <> "" then
me!unBoundTextbox = me.combo.Column(1)
else
me!unBoundTextbox = Null
end if
end sub

on your query, you need 2 criteria, your Combo and the UnboundTextbox.
Thank you so much
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 07:01
Joined
May 7, 2009
Messages
19,237
you're welcome.
 

Users who are viewing this thread

Top Bottom