Problem with Restrict

M

Mac

I need help

I am trying to get all appointments starting from a specified datetime using
the following code

sfilter = "[Start] > '" & Format("1/15/99 11:30pm", "ddddd h:nn") & "'"
Set calResItems = calitems.Restrict(sfilter)


When I execute this code I get the following error

Run-time error '-2147352567 ( 80020009 )':
Type mismatch or the value "1999-01-15 23:30" in the condition is not valid


If I use the following code I don't get any errors, the only change I did
was changing the time.

sfilter = "[Start] = '" & Format("1/15/99 3:30am", "ddddd h:nn") & "'"
Set calResItems = calitems.Restrict(sfilter)

Please, help me

/ Mac
 

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