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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dcount

Status
Not open for further replies.

mikeba1

Programmer
Joined
Jan 2, 2005
Messages
235
Location
GB
i have a form with two dates and a command button to execute the following dcount
it does not give me the same results as whenj i run a query directly

is my syntax wrong

x = DCount("roombookings.status", "roombookings", "(RoomBookings.Status)='B'AND ((RoomBookings.Appdate) Between #" & [Forms]![frmallrecords]![sd] & "# And #" & [Forms]![frmallrecords]![td] & "#)")
 
have changed format on the form to mm/dd/yy but the results are the same with format dd/mm/yy
 
Try hard-code in some dates using the debug window:
Code:
?DCount("status", "roombookings", "Status='B' AND Appdate Between #11/1/2010# And #11/30/2010#")


Duane
Hook'D on Access
MS Access MVP
 
thanks, problem solved, was not converting date correctly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top