As afore mentioned, i wanted to refrain from having anyone hammer out the solution to this as i chose to take it on, but to keep me from going insane, i need some help!
I can't wrap my head around handling the quotation marks when running an SQL statement with variables, especially string variables, in VBA. I started even trying multiple "Let's delete this quotation mark, let's add one over here,..." and quickly realized that won't do me any good because even if i hit on the right combination, i will have learned nothing.
Here is the most recent wrong iteration-
ALL THE BACKGROUND STUFF YOU PROBABLY DON'T WANT TO KNOW:
IEmployee is a long integer
strAgreement is a mixed character string
tblPersonnel fields: IDPG (the key), IDCXEmployee (an integer foreign key that corresponds to a specific person in another table), IDAgreement (an internal document identifier).
A formal written agreement is identified by strAgreement in the user interface, as is IEmployee.
IEmployee is a selected individual that was previously (pretend a moment ago) selected to be on the agreement IDAgreement, where the agreement is identified by strAgreement, that now i changed my mind, was told not to, whatever reason, and i wish to delete that person from the table list of people who might be on that Agreement.
The reason for using both the lEmployee AND strAgreement is that the table tblPersonnel will hold multiple agreements and people, some people could be on differing agreements.
I think i am close, but still, i have no set thought process of why and where (or should that be where or why?), i just was emulating examples i saw.
Please help, i have four daughters who don't want Daddy locked away for climbing a tree and eating bugs and branches...
THANK YOU!!!
EDIT: Thank goodness i am also researching for a neurologist in the area. I think i understand the " syntax structure now - the issue is a datatype incompatibility whose origins i located, now i need to resolve-
EDIT 240709: The datatype error was from my putting lEmployee, a long integer, in double double quotes (which i have learned are for string, single double quotes are for numbers). This is definitely "learn as i go"!
Bookmarks