Yes, I understood your intended function, but from what I know of the LEN keyword it returns an integer equal to the number of characters in the string, sstrHover.
As written, I don't think the IF statement compares anything meaningful and probably defaults to NULL, so the code will 'drop...
I don't quite see what you are expecting to compare in your code:
If Len(sstrHover) Then...
What length string are you expecting to compare / find in variable sstrHover at either of the branches?
I checked and found that my typical VBA code for each form was actually in the OnLoad area trather than OnOpen, although I don't think it make a difference.
I also forgot to say that with your user's habit for changing things it's probably a good idea to put a DoCmd.Maximise before the...
Hi,
It would help if you identified how your open form selects the different table(s). Is this from another button, a combo box (drop-down list) or what? To get the required average could be straightforward; the action of selecting the table just needs to run some code to 'plug in' the table...
Hi Liz, no unfortunately it does not work for the main Access application. You have to add it to the 'OnOpen' code for each form. This sounds as though it is a bit of a chore but does have the advantage of allowing you to set the exact size of each form. As well as defining the form size it...
I always put a DoCmd.MoveSize command in the start of the code for ALL my forms. That way the user can't change the form other than by using the minimize or maximise buttons, and it will always reset when the form is next opened to the proper size.
I don't think you can use IsNull to compare to a variable in the way you have, i.e. YourExpression >0.
Null only checks for True or False:
Quote from Access Help:
"Important Use the IsNull function to determine whether an expression contains a Null value. Expressions that you might expect...
The way I would do this is: in the OnOPen property of the report, set this to an event procedure which uses the strCcriteria you have built, e.g.
DoCmd.Apply Filter, "YourSQLstringCriteria"
Hi folks,
I have several linked projects with a shared resource pool. Can anyone advise if it is possible to set the priority of one project to be higher than another at the Project level so that the higher priority project has first call on the shared resource when levelling? (I know that you...
Hi Folks,
I have an Excel application that I use to draw a whole series of charts from an Access database, and these are updated weekly. This means that the number of rows imported for each query increases by one each week.
Originally I used the wizards to do all the connection stuff, and so...
Hi Harley - thanks for the prompt reply and Star for you.
I tried Me.path but this would not work since I wanted to put this code in a Module. A bit of experimenting later and making it a function call got it to work as
MyDirectory = MyObject.Path
Thanks
Hi Folks,
I want to be able to distribute an Excel graphs report spreadsheet, along with a corresponding Access database, for users to install in any directory. So, I need to be able to modify the importing of the various data to Access and queries from Excel to suit the installed path, but I...
Thanks Skip - I did not realise you could actually add times to dates directly unless the field was set to the "general" date/time format. After experimenting with your solution it seems that both Date and Time variables have implicit components of each other, even if they are not always...
Hi folks,
I searched through loads of posts about Date arithmetic etc. but can't quite find a situation like I have:
I work with an old database which has separate pairs of fields, StartDate and StartTime, and EndDate End Time.
I need to calculate (in minutes) the elapsed time between start...
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.