I've read up a bit on SQL, but basically I am a total coding and SQL beginner. I understand how to write some complicated Excel formulae, and that's about as close as I get (not very close).
To practice I thought I'd try what I thought would be a simple easy step. To create a calculated yes/no field. This is only an exercise. Field1 is Name and has a list of names. Field2 will be the calculated yes/no field. If the data in Field1 matches the criteria I specify for Field2, Field2 will hopefully return a tick (or check) for Yes.
So I already have my names field (Field1) and I click on Add Field, "Calculated" and then "Yes/No". The Expression Builder comes up, and I type in:
WHERE [field1] like "James".
I also tried just
[field1] like "James"
Surely this should be either True or False, and since I'm creating a yes/no tick (check) box then TRUE should translate to a tick, while FALSE should translate to no tick? Well obviously not! It doesn't work!
I lack the Syntax to tell Access what to do if the condition WHERE etc or LIKE is met. I assume that with a Yes/No box, what to do if the condition is met is obviously to tick the box. But it seems I must spoon feed this to Access. I obviously have a major syntax lack of understanding. Examples I've googled involved the line "Select" but I don't want to Select as I am not building a query, just an expression.
Please explain, and if possible explain the different parts of an expression such as what is an OPERAND, and then explain your answer in those terms, so I can make sure I code using all the correct coding "parts of a sentence" I'm probably using nouns and adjectives without any verbs or something. I completely lack the language to engage with this, but I'm sure I can master the logic.
To practice I thought I'd try what I thought would be a simple easy step. To create a calculated yes/no field. This is only an exercise. Field1 is Name and has a list of names. Field2 will be the calculated yes/no field. If the data in Field1 matches the criteria I specify for Field2, Field2 will hopefully return a tick (or check) for Yes.
So I already have my names field (Field1) and I click on Add Field, "Calculated" and then "Yes/No". The Expression Builder comes up, and I type in:
WHERE [field1] like "James".
I also tried just
[field1] like "James"
Surely this should be either True or False, and since I'm creating a yes/no tick (check) box then TRUE should translate to a tick, while FALSE should translate to no tick? Well obviously not! It doesn't work!
I lack the Syntax to tell Access what to do if the condition WHERE etc or LIKE is met. I assume that with a Yes/No box, what to do if the condition is met is obviously to tick the box. But it seems I must spoon feed this to Access. I obviously have a major syntax lack of understanding. Examples I've googled involved the line "Select" but I don't want to Select as I am not building a query, just an expression.
Please explain, and if possible explain the different parts of an expression such as what is an OPERAND, and then explain your answer in those terms, so I can make sure I code using all the correct coding "parts of a sentence" I'm probably using nouns and adjectives without any verbs or something. I completely lack the language to engage with this, but I'm sure I can master the logic.
Last edited: