Moved the FAYT code to Form_Load. Thanks for the observation.... however, the code still goes to fosUserName(). Same errors as above, to include it going to the subform FAYT Form_Load code.
This is likely to be a multi-part posting. What the heck is causing this weird behavior?
My code to open a form is supposed to close the navigation form, log that the form is closed (all of this works right) and then open the Contacts form (where the code is breaking down).
What happens when...
Easy solution. Just add the Value for the Parent_ID to the query that the form is based on. Then you can sort on the value
Sometimes you just need to talk it out, get a back and forth conversation going to get the brain to think.
Thanks.
Private Sub Label4_Click()
'Sorting A-Z on a field...
I'm seeing if it might work w/ ELookup (http://allenbrowne.com/ser-42.html).
Got the idea from (http://www.utteraccess.com/forum/dlookup-sort-order-t1982937.html)
Here's a visual. I'm trying to sort A-Z by the Parent field (red arrow).
If I sort by me.Parent_ID I get the below visual. Since they are in the sequence that they were entered into the database.
I want to sort my form by the value populated from a combo box. Is it possible?
The combo box is storing a primary key # ([Parent_ID]) as the 1st column (hidden) and then showing the selected organization([Organization]).
Here's the current code. It's erroring on a missing operator...
So simple, it's in your face. The answer was in the MaxDate2 code. Change the below from As Date to As Variant. And on top of it, it was in the fixed code that @MajP had provided me. For some reason the change didn't migrate with my database updates.
FROM
TO
Public Function...
I don't understand what you mean when you said you renamed the project.
It appears you got the MaxDate2 to run (last column in the query). The function that runs it is in the same module as the column MaxDate1 that is erroring.
Option Compare Database
Option Explicit
Public Function...
Having issues with the code.
1) In this test database (attached), I can't get the Public function to work. Even though it's the same code as above. Error "Undefined function maxdate in expression"
This is what's in the query
MaxDate1: maxdate([created],[start_date],[end_date])
This is the...
The negative of running this code on Exit, is if I click on a record entered by someone else, say just to view it, I'll be spell checking other people's spelling errors vice just mine for the records I just entered.
With the previous way, I was telling the Call to spell check a specific text box. If I change the call to point to the primary key of the record, how will it know which field to check?
How you would you have me modify the below Public Function?
Option Compare Database
Option Explicit...
Visual of what's happening. I put in some text in the Notes field and leave the cell. The call procedure to spell check, running on a Before_Update, gets to the .SetFocus line and then errors. What am I missing?
@Gasman Close enough to get me there. I'll test on my unique user. Thanks.
Zira.Speak "" & GetGreeting() & IIf(InStr(1, Trim(fOSUserName()), " ") > 1, Left(fOSUserName(), InStr(1, fOSUserName(), " ") - 1), fOSUserName())