Access queries running slowly using forms objects in criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Anyone know anything about this?

I'm using MSAccess 2003 sp2 and I have several queries that run quickly when
I use hard values or prompts in the criteria line but as soon as I try to use
a value from a text box or combo box on a form they grind away for minutes on
end.

Thanks,

Tom.
 
If the controls on the form are unbound, then Access may not know what the
datatype is, which can cause performance issues. Maybe wrap the parameter
with cint, cdate, or other function to help it better understand?

e.g. CInt([Forms]![formname]![controlname])

(You could also try using the parameters declaration box to specify the
datatype, too. I've never tried it with this syntax, so don't know if it
will work. Choose Query / Parameters from the Menu.)
 
Thanks, I'll give it a try.

Tom.

S.Clark said:
If the controls on the form are unbound, then Access may not know what the
datatype is, which can cause performance issues. Maybe wrap the parameter
with cint, cdate, or other function to help it better understand?

e.g. CInt([Forms]![formname]![controlname])

(You could also try using the parameters declaration box to specify the
datatype, too. I've never tried it with this syntax, so don't know if it
will work. Choose Query / Parameters from the Menu.)

--
Steve Clark,
Former Access MVP
FMS, Inc
http://www.fmsinc.com/consulting



Tom Telford said:
Anyone know anything about this?

I'm using MSAccess 2003 sp2 and I have several queries that run quickly when
I use hard values or prompts in the criteria line but as soon as I try to use
a value from a text box or combo box on a form they grind away for minutes on
end.

Thanks,

Tom.
 
Back
Top