Although I find that if you use this function on the current from while you're in a command button's click event, the wrong result comes out. I assume there's some problem with the form losing the focus when you did that. Solved this by setting frmtocheck to always check the startup form of my...
Hey, that works nicely. Do need to pass it a form (to use in place of frmToCheck), but that was easily added. Thanks!
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
That's indeed what I did, just used a global boolean which is set to true when I'm opening forms modal and false when I'm opening them regularly. Couldn't find any other way to do it; probably because the idea of opening the same form in both ways in one application is uncommon to begin with...
Is there any way I can determine at runtime if the form that is currently active has been opened modal or non-modal? I couldn't find a form property for this. I could, I suppose, use a boolean variable blnModal which is updated by the routines in which I open the form (false for non-modal, true...
Thanks, that's what I thought. It's a non-changing value, fortunately, so in that sense it's suitable enough as a primary key.
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
I've been having a discussion with a co-worker who feels that relationships between tables on a varchar type column should be avoided, as in his opinion they'll be much slower in query execution than on int type columns. In the database we're working on, we've currently got a varchar relation...
Thank you all for the help. I've gone with a slightly different approach in the end (using an assisting column for sorting), but this one did work for me and will definitely come in helpful later.
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
Getting an 'incorrect syntax near keyword FROM' on the code from swampBoogie and r937; figured SQL Server was ANSI-compliant but from the look of it I figured wrong. Anything I can change about it to make it work for me?
"Much that I bound, I could not free. Much that I freed returned to...
This looks very promising, but unfortunately there's one more complicating factor: the country code is not guaranteed to be 2 characters, and so the year is not guaranteed to begin at the 4th space. It does, however, always begin directly after a letter which is usually S but not always...
I'm stumped by a sorting order my customer needs on a field containing a multipart numeric code. Code consists of a country code, a letter, a two-digit year code and then an increment, for instance
31S03008
would be a record in the Netherlands (country code 31), and number 008 there in the...
400000 records in an Access table? That's seriously pushing limits; might find you need a stronger DBMS for a database of that size.
Have no firsthand experience with Access databases that large but if my teacher back in college was to be believed, if you go beyond 100000 records or so in an...
I've run into similar problems trying to find sites about the sitcom Friends. The less said about "18 yr old Amanda and her friends!", the better.
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
I've only done one professional project thus far (and worked a bit on a second one originally made by somebody else), and I already notice very strongly what Onyxpurr mentions: they always know into the smallest details how they want to enter data - and it usually doesn't make sense how - but...
The # is Access only, you'd use regular quotes in SQL Server. In addition, check Books Online for the CONVERT function which you may find necessary when working with dates in another format than the standard (I, for instance, have to use this constantly because I use a European format that...
To be honest the whole concept of 'NEW' declarations is still an enigma to me. It's one of the things I still need to read up on and experiment with. Starting a new application at a different company next week and have ordered what looked like a pretty comprehensive book on VB programming, so...
My (limited) experience with forms asking about medical conditions is that it's best to downplay anything and everything, so that *you* are the one who decides if you're fit to work, not them. I don't consider this entirely dishonest either, because on paper everybody looks seriously ill...
Sounds like CClint's code is going to be my easy deadline-friendly solution for now, but I'll definitely look into mattKnight's solution as well. Gotta keep learning.
Thanks, and star to both of you.
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee...
No prob at all, was less than a minute in it. Besides, you tend to explain things better than I do.
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
Use a counter in the Timer event. For instance:
Private MyVar as Integer
Private Sub tmrMyTimer_Timer()
MyVar = MyVar + 1
If MyVar = 5 then
(whatever code you want to execute every 5 minutes)
MyVar = 0
End If
End Sub
Now, with the interval set to 60000 ms (1 minute), the timer event...
At a certain point in my VB6 program, I want to check if another form is currently open (and refresh an ADO control there if it is). However, if it's not open, I want nothing to happen.
I've tried doing this with the .Visible property as follows:
If Form1.Visible = True then...
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.