Probably the date format. That's why I recommended looking at Allen's
article. It's all there in the article, explained much better than I could
explain it here and now.

Signature
Brendan Reynolds
Access MVP
On 30 Mar, 10:43, "Brendan Reynolds"
<brenr...@discussions.microsoft.com> wrote:
> Probably the date format. That's why I recommended looking at Allen's
> article. It's all there in the article, explained much better than I could
[quoted text clipped - 8 lines]
>
> - Show quoted text -
I've read Allen's article but i don't think thats whats causing the
problem unless i'm mistaken
need more help plz!!
Douglas J. Steele - 30 Mar 2007 17:29 GMT
> On 30 Mar, 10:43, "Brendan Reynolds"
> <brenr...@discussions.microsoft.com> wrote:
[quoted text clipped - 7 lines]
>
> need more help plz!!
You're not enclosing your dates in # characters.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
RoyVidar - 30 Mar 2007 18:21 GMT
"Asif" <asifhashmani@hotmail.com> wrote in message
<1175271081.001829.73300@p77g2000hsh.googlegroups.com>:
> On 30 Mar, 10:43, "Brendan Reynolds"
> <brenr...@discussions.microsoft.com> wrote:
[quoted text clipped - 16 lines]
>
> need more help plz!!
I think there might be several challenges with your initial approach.
One, is that the row source of the listbox probably contains a valid
date/time, which when presented in, and collected from a listbox,
becomes a text. The coersion/conversion, implicit or explicit, between
dates and text, is among the issues creating frustrations when working
with databases. I would recommend trying to avoid such, and only
convert to text when you are sure you wont need to convert it back to a
date again.
The next, as described in Allen Brownes article, that when you "feed" a
date into a string, which is passed to the Jet engine for
interpretation, it needs to be in a format Jet understands. Jet will
understand the format described in the mentioned article, or for
instance the ISO 8601 format "yyyy-mm-dd hh:nn:ss", and it needs the
date enclosed in octothorpes (#) - that is, if the field is defined as
Date/Time.
So, if you are positive the text in the listbox will be consistant, you
could try something like this:
...and BINPROCESSDate = #" & _
Mid$(Trim$(lst_entry.Column(1)), 4, 2) & _
"/" & Mid$(Trim$(lst_entry.Column(1)), 1, 2) & _
"/" & Mid$(Trim$(lst_entry.Column(1)), 7) & "#"
Which - if I've typed reasonable correctly, should become something
like
and BINPROCESSDate=#03/16/07 15:11:06#
i e mm/dd/yy hh:nn:ss
You may test by assigning to a string, then typing to the debug window
dim s as string
s = "BINPROCESSID = " & lst_entry.Column(0) & _
" and BINPROCESSDate = #" & _
Mid$(Trim$(lst_entry.Column(1)), 4, 2) & _
"/" & Mid$(Trim$(lst_entry.Column(1)), 1, 2) & _
"/" & Mid$(Trim$(lst_entry.Column(1)), 7) & "#"
debug.print s
Then hit ctrl+g to pick up the criterion from the immediate pane.
You should be able to copy/paste from there, into the SQL view of a
query based on this table as the WHERE clause (add the keyword WHERE
too), and test whether it is correct or not.

Signature
Roy-Vidar
Brendan Reynolds - 30 Mar 2007 21:24 GMT
Hopefully the advice you've received from others has been enough to resolve
the problem. But if you're still stuck, try posting the expression as it now
stands. We haven't seen any of the changes you've made since you posted the
original expression that didn't include the delimiters, so we're trying to
debug an expression that we haven't seen. If you post the expression as it
now stands, someone will probably be able to see what the problem is.

Signature
Brendan Reynolds
Access MVP
> On 30 Mar, 10:43, "Brendan Reynolds"
> <brenr...@discussions.microsoft.com> wrote:
[quoted text clipped - 17 lines]
>
> need more help plz!!