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

DCount No Data on Report 1

Status
Not open for further replies.

RachelK

Programmer
Mar 18, 2002
171
0
0
GB
Hi,

I am trying to do a count of records in a report if there are no records I do not want to run the report.

StudentPin = 0050000
Me.ELFromPIN = D0050000
Me.ELToPin = D0050000

The student pin does not have a prefix of D however on the form they do to the users hence Me.ELFromPIN = D0050000
Me.ELToPin = D0050000 both being prefixed with D this is why I can't get my Dcount to work properly.

DCount("StudentPin", "tblL4DEnrolment", "StudentPin between " & Right(Me.ELFromPIN,6)& " And " & Right(Me.ELToPin,6))

Thanks Rachel.
 
Something like this ?
DCount("StudentPin", "tblL4DEnrolment", "StudentPin between '" & Mid(Me.ELFromPIN,2) & "' And '" & Mid(Me.ELToPin,2) & "'")


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top