Hi Daantje,
I presume you're from Holland or somewhere near, so the problem will
probably be the date format, wich is dd/mm/yyyy in dutch and
mm/dd/yyyy in the Access database. To correct this use the Format()
function:
SQL_Str = SQL_Str = "SELECT pid FROM registratie WHERE datum =#" &
Format(Forms!TijdReg.[datumveld],"mm/dd/yyyy")
& "# AND pid='"& CurrentUser() & "' "
(All on one line, i just cut out the relevant part for illustration)
That should work just fine.
Good luck,
Gert-Jan
"DL" <da*******@hotmail.com> wrote in message news:<40*********************@news.wanadoo.nl>...
Hi,
I'm using this query in VBA:
SQL_Str = "SELECT pid FROM registratie WHERE datum=#" &
Forms!TijdReg.[datumveld] & "# AND pid='"& CurrentUser() & "' "
im using it like this:
Set dbs = CurrentDb
SQL_Str = "SELECT pid FROM registratie WHERE datum=#" &
Forms!TijdReg.[datumveld] & "# AND pid= '" & CurrentUser() & "'"
Set Some_Recordset = dbs.OpenRecordset(SQL_Str)
But i'm getting no records?
I know there are records to show.
Can anybody help me???
I've already spent two hours+ looking on this one...