This code isn't working any more..

  • Thread starter Thread starter jokobe
  • Start date Start date
J

jokobe

I used this code on my old desktop:
Rs.Open "Select * from " & _
" mytable "
'" where online_seminar_id = " & IntNumber & " "
" where kundenname = '" & StrMyAutor & "' "
and it worked fine. but now with a new system it isn't working any more.
When debugging, I can see the value ( strmyautor) contain the same string,
but I don't get a recordset.
If I select all records from mytable and, move rs.kundenname into mystring
and try
If mystring = strmyautor then ... I never have the same value, althoug both
variable contain in the debugger the same name.

Any helpful hint?

jokobe
 
Oh.. and your second 'where' needs to be 'and'
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
Try to run the code as a query and see what happens.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
that part with where is true.

I'm working with Ms Access 2003, on a Vista system.
I get the value from a longer string containing some text and the value for
strmyautor. I trim the value and the code is working if I use for strmyautor
= "John Wayne", but if the source string contains "John Wayne" it is not
working.
 
Back
Top