Thanks, ESquared. All Makes sense. And you're right, my little work-around wouldn't do jack if the form changed names. I was thinking of:
DoCmd.CloseForm, acForm, me.name.
Hey NorthNone, you're welcome! Sorry for the deprivation, though, but I'm sure there are plenty of other fun and exciting ways out there of earning your grey hairs! :)
Hi. My understanding is that it shouldn't work on any machines. Why? Because we cannot use VB functions within SQL statements when working with a Transact SQL back end instead of the Jet engine. (Access Project instead of an MDB)
Format$, for example, is VB function. In controls it should be...
The expression (1 = 1) will always evaluate as true, hence the SQL is effectively the same as:
SELECT * FROM vwAcme
For interest, I have used such a clause when compiling SQL statments dynamically in VB code for use subsequent use as a form recordsource. I build up a WHERE clause based on...
Just been through a fun little debugging effort that began when I discovered my form had a ghost!
I'd open the form from a commandbutton and play with the newly openened form via VB. Happily. That is, until I discovered the values I was getting back from VB disagreed with what the form was...
Yep, found it. When I call , [formname].recordsetclone, the form is automatically opened.
Something like that.
I've coded my way around it.
But thanks, forum, for your help. Just posting it here seemed to do the trick. ;)
Ok, I think I've found the bug! The form was not on drugs, because that is just silly. No, the form has a GHOST!!!
I'm not kidding. When I open it, two versions actually open!!
So, what I am querying from VB and what I am looking at are actually two different instances of the form. Wierd...
If this bizarre issue has been addressed earlier or I am missing something fundamental, please forgive me...
My garden variety form is based on a simple table ("Issues"), has a tab control with a few subforms on a couple of its pages...pretty ordinary...but it behaves like a thing possessed...
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.