As has been noted in other posts, the FindNext does not work when used in a UDF (User Defined Function). This can be quite irritating / frustrating because the exact same code will work in a Sub.
However, for those wishing to have the FindNext feature available in a UDF, here is an alternative...
genius, utter genius! :-)
also, one small usage note on strongm's function: in some cases it is helpful to put the value into an interger variable before calling the function (in my case, the function call is nested in a "For Each sh in .Shapes" loop; and calling the function with...
thanks for the tips and ideas Steve and Gerry. I did some more digging and found (in the microsoft online labrynth, of all places) a "how to", which mentions a "getNames" function, which can be used on Enumerations. (article is here: http://msdn2.microsoft.com/en-us/library/b1kz44y8.aspx )...
this seems to be a simple question, but i don't know how to do this...
so here is the problem: within the pre-defined VBA constants there are names and coresponding values. When using the constant's name, you have easy access to the value. For instance, the simple command of...
oh, by the way, although the forms name is "subform_...." THIS IS NOT USED AS A SUBFORM.
That was my orginal intent, but MS does NOT ALLOW SUBFORMS TO BE BASED ON A CROSSTAB QUERY. so instead, I use it as a pop-up. not ideal.
yep, I did try it with the code in "On Unload", but it still didn't work (the code ran, but Access still saved the old value).
however, I did come-up with a work around. before I open the form, I edit to clear out the OrderBy value. the code, which is in a button that opens the form, is as...
Hi everyone,
Here is a confusing one:
I have a form, which is based (indirectly) on a crosstab query. This means that the resulting number of columns and thier names are different for each load of the form. I have worked thru almost all the issues of handling the dynamic columns (upto a...
Hi everyone,
I've been banging my head against a wall over this problem, and am about to give up. but I hope that someone can help me with this one.
the idea is simmilar to thread http://www.tek-tips.com/viewthread.cfm?qid=768863.
basically, I have a parent form (form_A) with 2 subforms...
Thanks everyone!
This code seems to work the best:
Sub sCopyTableStructure(strOldTableName As String, strNewTableName As String)
If vbYes = MsgBox("Sure?", vbYesNo + vbDefaultButton2 + vbExclamation, " ") Then
DoCmd.TransferDatabase acExport, "Microsoft Access", CurrentDb.Name...
Hi Everyone,
First I want to say as someone new to VBA, that this site / Forum has been very, very helpful to me. THANKS FOR ALL THE POSTINGS!!!
also, a quick question: How can I create a new table that is based on the defintion of an already existing table?
for example, my code process...
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.