Question

L

learning_codes

Hi,

I want to create "Completed: # of # -Total Questions"

I created two text box


txt_completed: If([Completed] like "Yes", =Count([Yes])

txt_Total: If([Completed] like "Yes" or "NO",=Count([Completed])


="Completed: " & [txt_completed] & " of " & [txt_total]

I want to know if there is a better way of doing this. Your help
would be appreciated.

Thanks
 
D

Dirk Goldgar

Hi,

I want to create "Completed: # of # -Total Questions"

I created two text box


txt_completed: If([Completed] like "Yes", =Count([Yes])

txt_Total: If([Completed] like "Yes" or "NO",=Count([Completed])


="Completed: " & [txt_completed] & " of " & [txt_total]

I want to know if there is a better way of doing this. Your help
would be appreciated.

Thanks


Without more detailed description of your table and form, it's hard to be
sure; however, I'd think you could use something along the lines of:


="Completed: " & Sum(IIf([Completed]="Yes", 1, 0)) & " of " & Count(*) &
" total questions"

as the ControlSource of a text box in the form header or footer. Note that
the expression is intended to be all on one line, though it will have been
broken onto two lines by the newsreader.
 
Top