Relative Content

Tag Archive for ms-access

Data type mismatch error in criteria Access SQL

this has been driving me crazy and I’m hoping someone is able to guide what I’m missing. New-ish to SQL (more of a VBA background) and I am trying to get a column to display only positive numbers in the result but I keep running into a Data Mismatch error.

Access query returns additional results not included in criteria

thanks for any help offered. I am relearning access and trying to create a query that returns results from six columns based on one criteria. To limit my problem, I entered the criteria in the first column I want to query. The correct result is displayed but access returns a value in a few of the other columns that I didn’t ask for. I tried putting Is Not Null in the criteria for those columns but still get the same result. I thought it might be spaces that came in from the excel spreadsheet and so I trimmed the data and reloaded it. Getting the same result. My table is set up as follows:

MSAccess Report Header Calculation

within the header group, I have called the “Stop Number” from the database (2) and by adding 1, the next header field is produced Each header contains a time.
my details are not visible in order to provide a summary.
when the next header group appears, it has a displays the stop number “2” and as before, a stop 3.
The following is the dlookup I used to look up the time for the 2nd header so I can use a DateDiff to calculate the minutes between each Header time.
dtTime2 = DLookup(“[tTime]”, “PA823-24”, “[PA823-24]![tAMStopNo]=txtStopTwo”). I really don’t expect this formula to work. It is just the 3 or 400th one I’ve tried.