Datasheet form based on a value in a combo box

G

Guest

I want to create a form in a datasheet view. Data displayed should be based
on a value picked from the combo box. For ex. a user will select his name in
the combo box. Based on his name, his clients will be displayed in the
datasheet view. How do create such a form?
 
T

tina

use the value of the combo box to filter the records in the form's
underlying table, as

Me.Filter = "MyField = " & Me!MyComboBox
Me.FilterOn = True

the above syntax is for Number data type.if the data type of MyField is
Text, then change the syntax to

Me.Filter = "MyField = '" & Me!MyComboBox & "'"

hth
 

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