match

G

Guest

I have a combo box with a list of months-text
I alos have date field that only shows month. When the form opens I want
the two fields to match. However I have one in a date field and one in a
text field. I don't know what to do. When I choose my month from the combo
box, it filters my form. I would like for it to do that. The current code I
have is
Private Sub Combo87_AfterUpdate()
Me.Filter = "[tblGrantCompletion.theMonth] = '" & Me.Combo87 & "'"
Me.FilterOn = True

End Sub

tblGrantCompletion.theMonth is a text field. I can not at this time change
it to a date field. I gives me error messages and won't perform the task.
Thanks
 
G

Guest

try
Private Sub Combo87_AfterUpdate()
Me.Filter = "[tblGrantCompletion.theMonth] = #" & Me.Combo87 & "#"
Me.FilterOn = True
 
G

Guest

I tired this and nothing happened. I actually want it to go under on open.
So the drop down box will choose the month that matches my date field, and
filter I want to leave the combo box alown when it comes to the filtering
part. I still want to be able to choose a different month and it filter. I
use the months to log in billing forms. That is why I would like to match my
date field. I have it formated to make the current billing month visiable.
Thanks

default105 said:
try
Private Sub Combo87_AfterUpdate()
Me.Filter = "[tblGrantCompletion.theMonth] = #" & Me.Combo87 & "#"
Me.FilterOn = True


Chey said:
I have a combo box with a list of months-text
I alos have date field that only shows month. When the form opens I want
the two fields to match. However I have one in a date field and one in a
text field. I don't know what to do. When I choose my month from the combo
box, it filters my form. I would like for it to do that. The current code I
have is
Private Sub Combo87_AfterUpdate()
Me.Filter = "[tblGrantCompletion.theMonth] = '" & Me.Combo87 & "'"
Me.FilterOn = True

End Sub

tblGrantCompletion.theMonth is a text field. I can not at this time change
it to a date field. I gives me error messages and won't perform the task.
Thanks
 

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