Bytes
My original question has been answered. VBA.Year works for me, at least until I find the conflict.
Access is inconsistant defining values that are dates. In Tables, table elements are Date/Time. In VBA, the Dim statement requires the keyword Date. In either case, the data is stored as Long, with the integer part the days since a starting date (1=Jan 1, 1900), and the fractional part the fraction of the day...
User Profile
Collapse
-
-
Why?
Using VBA.Year forces the compiler (intepreter) to operate the way I want, so problem solved.
The Now() function is the Time&Date as a single number. With the intepreter, there would be some (miniscule) time savings to zero the right-most digits. If compiled, a good optimizing compiler should make the statements equivalent, by passing the argument requiring the least amount of work for the function. As the argument in this...Leave a comment:
-
Thank you NeoPa for the quick reply.
Shift-F2 get me the message:
"Cannot jump to 'year()' because it is in the library 'C/Users/..../Books.accdb' which is not currently referenced."
That message is meaningless to me.
Books.accdb is of course my Project/DataBase name
Pressing 'Help' on the MessageBox takes me to a page about Visual Studio 2012 which wants me to subscribe before I can determine...Leave a comment:
-
Declare 'Builtin' Function
I used the name "Year" in tables as a field name. Now I would like to use the Access function Year(Date) within a user function.
The code:Code:Dim CYear as Integer CYear = Year(Date)
Is there a way to declare 'Year' as a Microsoft Function within a subroutine, i.e.Code:Dim Year as Function
-
You could try Microsoft's undocumented utility: Jet Compact Utility. This is described at http://office.microsoft.com/en-us/ac...570.aspx?CTT=1
This has worked for me when I could not otherwise open a 2003 database.Leave a comment:
-
You underestimate the chances that you will have duplicates. True that if the last names match, the chances that the Last4 will also match is 1:10000. However the 3rd identical last name may match either the first or the second Last4 with a probability of 2:10000. If the 4th match has a probability of 3:10000 of matching one of the first 3, then for four identical last names, the probability of a match is 6:10000.
This probability is...Leave a comment:
-
My apologies for getting off-topic. I did not intend that, nor do I want to confuse or mislead anyone using this forum to receive assistance or advice.Leave a comment:
-
If the focus is on the individual, then the only relationship that is meaningful is Male<->Female->Child. This means that 2 sisters, living together with the child of each, as a "family", must be defined by finding the common parent(s), whether living or not, if even known.
Today's science says that the parents don't even have to have met.
The OP original question is "How should I link husbands, wives,...Leave a comment:
-
I see that most of the suggestions are to create a primary table of individuals (persons), I do not agree. I would make the primary table Family, and that Family be a self-defined unit. Pat introduces themself and then introduces their "Family", which might include the children, spouse, and Granny (who lives in the guest house behind the main house).
Code:tblFamily FamilyID autonumber MailAddr Text
Leave a comment:
-
You could put code in the OnCurrent Event to check the status of "invoiced" and Enable/Disable or Lock/Unlock the appropriate controls.
In the simplist case, you would Disable or Lock all the controls for the row except the "invoiced" control. I would imagine that that could always be changed. If so, you would have to Unlock the controls if "invoiced" were changed to allow editing.
The...Leave a comment:
-
One of my pet peeves is to have a button which, when pressed, gives a message saying "You can't do that now". Not only have I gone to the effort of selecting and pressing the button, but I must now press "OK" to clear the error message. Hopefully, I don't forget which button I had selected, and select it again.
I'm using Access 2003, and if I open any table in 'datasheet' view, I will have a set of navigation...Leave a comment:
-
@ADezii - I'm not critizing your methods. I was pointing out to original poster that this, or any, function cannot determine the city name from its position in the string only.Leave a comment:
-
That will not work for Walla Walla, Port Angeles, or Saint Helens. Even the example "8235 127th St Ct E Tacoma" could be mis-parsed if E Tacoma were a city.Leave a comment:
-
If you substitute a sub-form for your listbox, you can apply conditional formatting to any row. You can make the sub-form appear almost identical to a listbox, and the user won't know the difference.Leave a comment:
-
I have the same problem. I'm also waiting for someone to answer!Leave a comment:
-
You can set Enabled and a few other properties in Access 2002 & later (& maybe earlier). In Design view, choose the control UserSubControl, then on the Menu bar choose Format ...Conditional Formatting. This can allow you to set .Enabled to True if field is zero length field (""). Otherwise it will remain .Enabled=False, which you would set in design view.Leave a comment:
-
I'm going to take a wild guess here.
When you moved them to a page on the Tab Control, did you loose the link from the control to the code? Check the Event 'On Click' to see if it still says [Event Procedure], and if no, then fix it. My guess wrong? Then forget this post.Leave a comment:
-
Why not add some amount of time, say 1 hour or 1 day, instead of 0 for any lap not completed. When you sort from lowest (fastest) time to highest(slowest ), the times with 1 day added will be at the bottom of the list.
This will also rank those who only participated on some days. For your 3 day event, if an athelete competed 2 days, their time would be faster than someone who only competed 1 day, even if their 1 day time were slower than...Leave a comment:
-
Slen - hope you're feeling better w/New Year :)
Thanks for the sample. For the image handling, logically similar to mine, as I would expect. The images are obviously embedded, because they were visible when I ran your Access program "Image Test".
I added the line of code:
Image0.Picture = Image2.Picture
in the Select Case ... Case 1 code. This line of code cannot be executed. The same error occurs...Leave a comment:
No activity results to display
Show More
Leave a comment: