var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: IIf VB statements
Here's a question:
Using VBA, is it possible to take a field, i.e. Type of Observation, which uses checkboxes with values of 1 - 6, and put the label that coincides with that check box value in an adjacent field.
I.E. if it says Type of Observation is 1, then I want the adjacent field to say Participating in meeting, etc.
and so on and so forth...
Kind of like an IIf statement.
i.e. IIf([Type of Observation]=1, "Participating in Meeting", Null)
I would use a SELECT CASE construction in this case.
If the numerotation of the options is contiguous and begins at 1, you could also use the Choose function:
SELECT CASE [Type of Observation]
Label.Caption = "Participating in meeting"
Label.Caption = "...
Have a nice day!
Label.Caption = Choose([Type of Observation], "Participating in meeting", " ... )
I wouldn't hard code that. Observation types probably belong in their own table with a friendly name/description.
I do have a separate table that lists the values, but how do I get that to show up in the new query?
Originally Posted by Teddy
Just join the table to your current query and add the column.
ur codings are working excelent.
I tried that, however, it doesn't show up in the new query that the VB code creates, even though the information is supposedly pulled from that query. Let me try once more.
Ok, I fixed my problem. My VB wasn't picking up the info from my query, which I'd created correctly, but my original table. So once I fixed that, everything else seems to be falling into place.
I guess sometimes the answer's so simple we miss it. Thanks for your help!