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. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|