open a form with filtered criteria

kes

Registered User.
Local time
Today, 11:17
Joined
Mar 6, 2013
Messages
53
Hi,

I'm trying to open a form with filtered criteria using this code:
Code:
DoCmd.OpenForm "Edit_Mission", acNormal, , "[Report_Date]=# " & Format(Me.Date, "dd\/mm\/yyyy") & "# And [Supporter_Name]='" & Me.Supporter & "'"

it used to work on access 2010 but now on access 2013 I get a blank form.

thanks for the helpers
 
It isnt a problem between versions, it is your date format.....

In code dates need to be in US format MM/DD/YYYY ....

Also your Me.Date, date is a reserved word, not the smartest of control names
Also your Me.Date, make sure it is an actual date control and not a text control.
 
thanks! thanks! thanks!
the changing to MM/DD/YYYY worked like a charm!
 

Users who are viewing this thread

Back
Top Bottom