What about doing the TRIM$(hostname) after you have done the replace () command.
The trim may not be working since there was a vbnullcar at the end and could not trim it.
Just a thought?????
If I understand Windows XP correctly If you go in and kill the "EXPLORER" process then that is the desktop you are killing. And when it restarts automatically it might not show buttons for previously running apps.
Maybe you should kill "Applications" and leave the "Explorer" process alone...
Only use "Set <variable> = nothing" when you are all done with it.
The reason is that setting a variable to nothing completely wipes out the contents of the variable.
This is what I understand.
I hope it helps.
Maybe someone else wants to step in and add comments???
I am not an expert but from what I have read I think the answer is:
If you use the keyword "SET" to for a variable then make sure to do the Set <var> = Nothing.
At the risk of getting grumppy here, if you have VB6 try this:
Code 1:
On error resume Next
Error 5
Code 2:
On error goto 0
Error 5
Code 1 will not produce any error messages. Code 2 will pop up a big ugly error that scares users of programs.
Take my word for this I am developing a vb6...
Thank you to both BJD4JC and AMACYCLELOONY.
The code from BJD4JC works perfectly and allows me to have the program work the way I want it to.
Very, Very Much EXTREMELY Appreciated.
This thread is now CLOSED!
I had just started looking at other controls beside a textbox. Mask Edit Control looks like what I need.
If not for a bad headache all morning, I would have thought of that sooner.
Sorry to be picky but, the input is a Telephone Number specifically. So the best thing is probably for me to "SOMEHOW" test it after the user does the entry.
I have tried to search Google and Search this site with no luck.
My problem is, I have a very simple data-entry form with a date and a textbox to enter a telephone number into.
I want to do tests to ensure a number is entered and not text like "hi there".
I was thinking "REGEXP" but it keeps...
It has been a while since I have played with dos, HOWEVER:
I think if you use a single PERCENT sign it works at the command prompt.
BUT, in a batch file you need to use TWO Percent Signs.
Try to in the batch file and advise us if this helps.
Am I correct that you tried:
if not isnull(txtFirstDate.text) then
Maybe change it to something like this:
if (not isnull(txtFirstDate.text)) or Len(txtFirstDate.text))>0 then
That way if the "Not isnull" does not trap it the len>0 should.
Please try that and maybe it will help.
If you check "RoyVidar"'s code you see:
strsql=strsql & "firstdate, "
Note the Comma and Space!
This code:
strsql=mid$(strsql,1, len(strsql)-1) & ")"
Needs to be:
strsql=mid$(strsql,1, len(strsql)-2) & ")"
That will remove the Comma and the SPACE!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.