Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

type mismatch

Status
Not open for further replies.

camidon

Programmer
May 9, 2000
268
US
When I use this line of code:

DoCmd.OpenReport stDocName, acPreview, , "GroupName = Forms![frmTAbyGR]![txtGroupName]" And "[OpenDate] Between #" & Format(BeginDate, "mm\/dd\/yyyy") & "# And #" & Format(EndDate, "mm\/dd\/yyyy") & "#"

I get a type mismatch error. Any idea as to why I would be getting this error and something I can try to make it work correctly.

I'm delaring both variables as strings.

Thanks for the help!

camidon
 
You need to declare your variables as dates if you want them to match a date/time datatype (OpenDate).

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top