Hi. It looks like you're trying to create a calculated field. If so, you can't use VBA at the table level. You actually have a limited amount of functions available to you at this point. What exactly are you trying to calculate?
I'm adding records into employee table. Where new employee is engineer he gets a degree "4" (calculated field).
If new employee architect , het gets "5" , e.t.c..
I'm adding records into employee table. Where new employee is engineer he gets a degree "4" (calculated field).
If new employee architect , het gets "5" , e.t.c..
Hi. I believe IIf() statements can only have up to seven (7) layers (or was it 14?). If you have more than that, and it's probably a better approach anyway, it might be easier to create a separate table of these values and simply link the two tables together in a query.
Again, though, VBA is not available at the table level, so you can't use it for Calculated fields. I mean, you could try with just one or two options in VBA and see if you can use it in the table. If you can, you can finish building it. If you can't, then you know you didn't waste your time building something you can't use.