A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SQL Backend is way too slow



 
 
Thread Tools Display Modes
  #11  
Old July 8th, 2009, 03:23 PM posted to microsoft.public.access.forms
TraciAnn via AccessMonster.com
external usenet poster
 
Posts: 178
Default SQL Backend is way too slow

Oh!

One other problem regarding the search text box.

If the user deletes the content of the text box or leaves the text box empty
(Null) and places focus on another object, the AfterUpdate event executes a
search pulling up all records.

I tried using:
If txtSearchUser = Null Then
GoTo Exit_txtSearchUser_AfterUpdate

but it didn't work. I also tried = ""

What code do I need to include to prevent the search from executing if a
value is not entered in the text box?

--
---
TraciAnn

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1

  #12  
Old July 8th, 2009, 03:39 PM posted to microsoft.public.access.forms
Clif McIrvin[_2_]
external usenet poster
 
Posts: 629
Default SQL Backend is way too slow

If txtSearchUser = Null Then

will *always* fail because of the way VBA processes Nulls (it's
somewhere in the built-in help files, I remember reading about it
grin.)

Also, I try to always use the .Value property for disambiguation -- VBA
could easily return the *text box* instead of the value, which would
also make the IF behave unexpectedly.

Try:

If IsNull(txtSearchUser.Value) then

but if the .Value property of a text box is always a string (I don't
recall, and don't have Access up and running right now) you won't be
able to check for null anyway. You may have to use breakpoints and/or
debug.print statements to determine what the textbox returns when empty.

--
Clif


"TraciAnn via AccessMonster.com" u50702@uwe wrote in message
news:98c51eb0d86af@uwe...
Oh!

One other problem regarding the search text box.

If the user deletes the content of the text box or leaves the text box
empty
(Null) and places focus on another object, the AfterUpdate event
executes a
search pulling up all records.

I tried using:
If txtSearchUser = Null Then
GoTo Exit_txtSearchUser_AfterUpdate

but it didn't work. I also tried = ""

What code do I need to include to prevent the search from executing if
a
value is not entered in the text box?

--
---
TraciAnn

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1




--
Clif


  #13  
Old July 8th, 2009, 03:39 PM posted to microsoft.public.access.forms
Clif McIrvin[_2_]
external usenet poster
 
Posts: 629
Default SQL Backend is way too slow

"TraciAnn via AccessMonster.com" u50702@uwe wrote in message
news:98c4dfbe7a3f0@uwe...
Clif and Albert,

Thank you so much!!!


You're welcome!


It is up and running and sooooo much faster

You guys are wonderful!'


aw, shucks -- just trying to help


--
---
TraciAnn

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1




--
Clif


  #14  
Old July 8th, 2009, 03:59 PM posted to microsoft.public.access.forms
TraciAnn via AccessMonster.com
external usenet poster
 
Posts: 178
Default SQL Backend is way too slow

OH DARN!!! You beat me to it.

I had just figured it out and came on to tell you but....

Regardless, I wasn't aware of the caveat if "value" isn't used. As always,
you provide extremely helpful knowledge, rather than just the answer. I like
that!!!

;-)

Thanks Clif!

--
---
TraciAnn

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1

  #15  
Old July 8th, 2009, 05:04 PM posted to microsoft.public.access.forms
Clif McIrvin[_2_]
external usenet poster
 
Posts: 629
Default SQL Backend is way too slow

It's all in the timing smile

Again, you're quite welcome.

"TraciAnn via AccessMonster.com" u50702@uwe wrote in message
news:98c56f0020802@uwe...
OH DARN!!! You beat me to it.

I had just figured it out and came on to tell you but....

Regardless, I wasn't aware of the caveat if "value" isn't used. As
always,
you provide extremely helpful knowledge, rather than just the answer.
I like
that!!!

;-)

Thanks Clif!

--
---
TraciAnn

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1




--
Clif


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.